// PointerOut is an event fired when the pointing device moved out of
// hit-testing boundary or leaves detectable hover range.
//
// https://developer.mozilla.org/docs/Web/Events/pointerout
514319
func PointerOut(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "pointerout", Listener: listener}
}
46511
func MouseLeave(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "mouseleave", Listener: listener}
}
509397
func consoleOutput(call otto.FunctionCall) otto.Value {
	output := []string{"JS:> "}
	for _, argument := range call.ArgumentList {
		output = append(output, fmt.Sprintf("%v", argument))
	}
	fmt.Fprintln(os.Stderr, strings.Join(output, " "))
	return otto.Value{}
}
574417
func PointerCancel(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "pointercancel", Listener: listener}
}
917765
func (s *IndicesPutMappingService) Timeout(timeout string) *IndicesPutMappingService {
	s.timeout = timeout
	return s
}
723919
func (pdbg *Pdbg) Out() io.Writer {
	if pdbg.sout == nil {
		return os.Stdout
	}
	return pdbg.sout
}
1175273
func (s *logScanner) finishLastPointer() *WrappedPointer {
	if s.pointerData.Len() == 0 || !s.currentFileIncluded {
		return nil
	}

	p, err := DecodePointer(s.pointerData)
	s.pointerData.Reset()

	if err == nil {
		return &WrappedPointer{Name: s.currentFilename, Pointer: p}
	} else {
		tracerx.Printf("Unable to parse pointer from log: %v", err)
		return nil
	}
}
1235854
func (fs *FlagSet) Out() io.Writer {
	if fs.output == nil {
		return os.Stderr
	}
	return fs.output
}
965281
func handleXpcEvent(event C.xpc_object_t, p unsafe.Pointer) {
	//log.Printf("handleXpcEvent %#v %#v\n", event, p)

	t := C.xpc_get_type(event)
	eh := *((*XpcEventHandler)(p))

	if t == C.TYPE_ERROR {
		if event == C.ERROR_CONNECTION_INVALID {
			// The client process on the other end of the connection has either
			// crashed or cancelled the connection. After receiving this error,
			// the connection is in an invalid state, and you do not need to
			// call xpc_connection_cancel(). Just tear down any associated state
			// here.
			//log.Println("connection invalid")
			eh.HandleXpcEvent(nil, CONNECTION_INVALID)
		} else if event == C.ERROR_CONNECTION_INTERRUPTED {
			//log.Println("connection interrupted")
			eh.HandleXpcEvent(nil, CONNECTION_INTERRUPTED)
		} else if event == C.ERROR_CONNECTION_TERMINATED {
			// Handle per-connection termination cleanup.
			//log.Println("connection terminated")
			eh.HandleXpcEvent(nil, CONNECTION_TERMINATED)
		} else {
			//log.Println("got some error", event)
			eh.HandleXpcEvent(nil, fmt.Errorf("%v", event))
		}
	} else {
		eh.HandleXpcEvent(xpcToGo(event).(Dict), nil)
	}
}
664928
func IsNotAPointerError(err error) bool {
	if e, ok := err.(interface {
		NotAPointerError() bool
	}); ok {
		return e.NotAPointerError()
	}
	if parent := parentOf(err); parent != nil {
		return IsNotAPointerError(parent)
	}
	return false
}
550042
func MouseUp(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "mouseup", Listener: listener}
}
933003
func (sc *SpriteContainer) OnTouchEnd(x, y float32) {
	sc.emitTouchEvent(x, y, touchEnd)
}
54590
func (ns *nurseryStore) removeOutputFromHeight(tx *bbolt.Tx, height uint32,
	chanPoint *wire.OutPoint, pfxKey []byte) error {

	// Retrieve the height-channel bucket and delete the prefixed output.
	hghtChanBucket := ns.getHeightChanBucket(tx, height, chanPoint)
	if hghtChanBucket == nil {
		// Height-channel bucket already removed.
		return nil
	}

	// Try to delete the prefixed output from the target height-channel
	// bucket.
	if err := hghtChanBucket.Delete(pfxKey); err != nil {
		return err
	}

	// Retrieve the height bucket that contains the height-channel bucket.
	hghtBucket := ns.getHeightBucket(tx, height)
	if hghtBucket == nil {
		return errors.New("height bucket not found")
	}

	var chanBuffer bytes.Buffer
	if err := writeOutpoint(&chanBuffer, chanPoint); err != nil {
		return err
	}

	// Try to remove the channel-height bucket if it this was the last
	// output in the bucket.
	err := removeBucketIfEmpty(hghtBucket, chanBuffer.Bytes())
	if err != nil && err != errBucketNotEmpty {
		return err
	} else if err == errBucketNotEmpty {
		return nil
	}

	// Attempt to prune the height bucket matching the kid output's
	// confirmation height in case that was the last height-chan bucket.
	pruned, err := ns.pruneHeight(tx, height)
	if err != nil && err != errBucketNotEmpty {
		return err
	} else if err == nil && pruned {
		utxnLog.Infof("Height bucket %d pruned", height)
	}

	return nil
}
1372595
func (sc *SpriteContainer) OnTouchBegin(x, y float32) {
	sc.emitTouchEvent(x, y, touchBegin)
}
595434
func (s *IndicesShrinkService) Timeout(timeout string) *IndicesShrinkService {
	s.timeout = timeout
	return s
}
647360
func (f *MockFunction) Timeout(d time.Duration) *MockFunction {
	f.timeout = d
	return f
}
242158
func (c *Context) postEvent(events ...types.BaseEvent) {
	m := Map.EventManager()
	c.WithLock(m, func() {
		for _, event := range events {
			m.PostEvent(c, &types.PostEvent{EventToPost: event})
		}
	})
}