// MouseUp is an event fired when a pointing device button is released over an
// element.
//
// https://developer.mozilla.org/docs/Web/Events/mouseup
550042
func MouseUp(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "mouseup", Listener: listener}
}
628828
func DragMouse(x, y int, args ...string) {
	Drag(x, y, args...)
}
328853
func (c *Conn) nodesUp() error {
	if !c.one.Up() {
		return fmt.Errorf("one %v is not up", c.One)
	}
	if !c.other.Up() {
		return fmt.Errorf("other %v is not up", c.Other)
	}
	return nil
}
1372595
func (sc *SpriteContainer) OnTouchBegin(x, y float32) {
	sc.emitTouchEvent(x, y, touchBegin)
}
865381
func PointerDown(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "pointerdown", Listener: listener}
}
733811
func (self *Commands) Focus(selector dom.Selector) (*dom.Element, error) {
	if elements, err := self.Select(selector, nil); err == nil && len(elements) == 1 {
		if _, err := self.browser.Tab().Evaluate(fmt.Sprintf(
			"document.querySelector(%q).focus()",
			selector,
		)); err == nil {
			return elements[0], nil
		} else {
			return nil, err
		}
	} else if l := len(elements); l > 1 {
		return nil, dom.TooManyMatchesErr(selector, 1, l)
	} else {
		return nil, err
	}
}
713277
func GetMousePos() (int, int) {
	pos := C.get_mouse_pos()

	x := int(pos.x)
	y := int(pos.y)

	return x, y
}
1018504
func ButtonType(button input.ButtonType) MouseOption {
	return func(p *input.DispatchMouseEventParams) *input.DispatchMouseEventParams {
		return p.WithButton(button)
	}
}
1229957
func (e *Element) MouseOver() error {
	x, y, err := e.getCenter()
	if err != nil {
		return err
	}
	return e.tab.MoveMouse(float64(x), float64(y))
}
1132078
func DeviceMotion(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "devicemotion", Listener: listener}
}
237377
func TouchEvent(x, y, id, action int) {
	Input.Mouse.X = float32(x) / opts.GlobalScale.X
	Input.Mouse.Y = float32(y) / opts.GlobalScale.Y
	switch action {
	case C.UITouchPhaseBegan, C.UITouchPhaseStationary:
		Input.Mouse.Action = Press
		Input.Touches[id] = Point{
			X: float32(x) / opts.GlobalScale.X,
			Y: float32(y) / opts.GlobalScale.Y,
		}
	case C.UITouchPhaseEnded, C.UITouchPhaseCancelled:
		Input.Mouse.Action = Release
		delete(Input.Touches, id)
	case C.UITouchPhaseMoved:
		Input.Mouse.Action = Move
		Input.Touches[id] = Point{
			X: float32(x) / opts.GlobalScale.X,
			Y: float32(y) / opts.GlobalScale.Y,
		}
	}
}
1304251
function mouseup(event) {
                    // Prevent default dragging of selected content
                    event.preventDefault();
                    // Remove helper
                    helper.remove();
                    // Change all selecting items to selected
                    var childs = getSelectableElements(element);

                    for (var i = 0; i < childs.length; i++) {
                        if (childs[i].scope().isSelecting === true) {
                            childs[i].scope().isSelecting = false;

                            childs[i].scope().isSelected = event.ctrlKey ? !childs[i].scope().isSelected : true;
                            childs[i].scope().$apply();
                        } else {
                            if (checkElementHitting(transformBox(childs[i].prop('offsetLeft'), childs[i].prop('offsetTop'), childs[i].prop('offsetLeft') + childs[i].prop('offsetWidth'), childs[i].prop('offsetTop') + childs[i].prop('offsetHeight')), transformBox(event.pageX, event.pageY, event.pageX, event.pageY))) {
                                if (childs[i].scope().isSelected === false) {
                                    childs[i].scope().isSelected = true;
                                    childs[i].scope().$apply();
                                }
                            }
                        }
                    }
                    // Remove listeners
                    $document.off('mousemove', mousemove);
                    $document.off('mouseup', mouseup);
                }
474220
func MouseOut(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "mouseout", Listener: listener}
}
1312632
func TouchStart(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "touchstart", Listener: listener}
}
532571
func (v *ViewPort) ScrollUp(rows int) {
	v.viewy -= rows
	v.ValidateViewY()
}
1126697
func (b *Driver) Up(val int) error {
	b.pcmdMutex.Lock()
	defer b.pcmdMutex.Unlock()

	b.Pcmd.Flag = 1
	b.Pcmd.Gaz = validatePitch(val)
	return nil
}
1215031
func (self *Form) Click(button string) bool {
	if _, ok := self.buttons[button]; !ok {
		return false
	}
	return self.send(button, self.buttons[button][0])
}