github.com/hsfzxjy/dgo/go@v0.2.0/dart_callback_group.go (about) 1 package dgo 2 3 type dartCallbackGroup []CallableDartCallback 4 5 func (dartCallbackGroup) specialInt() {} 6 func (dartCallbackGroup) getKind() _SpecialIntKind { return sikDartCallbackGroup } 7 func (g dartCallbackGroup) getPayload() uint64 { return uint64(len(g)) } 8 func (g dartCallbackGroup) serialize() uint64 { return serialize(g.getKind(), g.getPayload()) } 9 10 //lint:ignore U1000 go:linkname 11 func callbackGroupCall(callbacks []CallableDartCallback, samePort bool, args []Dart_CObject) bool { 12 switch len(callbacks) { 13 case 0: 14 return true 15 case 1: 16 return callbacks[0].callRaw(args) 17 default: 18 } 19 if samePort { 20 g := dartCallbackGroup(callbacks) 21 return g.callRaw(args) 22 } 23 panic("todo: unimplemented") 24 }