// EmulateTouchFromMouseEventWithParams - Emulates touch event from the mouse event parameters.
181871
func (c *Input) EmulateTouchFromMouseEventWithParams(v *InputEmulateTouchFromMouseEventParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Input.emulateTouchFromMouseEvent", Params: v})
}
880010
func NewDispatchMouseEventArgs(typ string, x float64, y float64) *DispatchMouseEventArgs {
	args := new(DispatchMouseEventArgs)
	args.Type = typ
	args.X = x
	args.Y = y
	return args
}
1185593
func ParseEvent(data []byte) Event {
	// Not supported
	return Event{Type: EventError, Err: errors.New("no raw events")}
}
940580
func (sc *SpriteContainer) OnTouchMove(x, y float32) {
	sc.emitTouchEvent(x, y, touchMove)
}
268153
func (tp *TouchPeer) OnTouchMove(pxx, pxy float32) {
	simlog.FuncIn()
	x, y := tp.calcTouchedPosition(pxx, pxy)
	for i := range tp.touchListeners {
		tp.touchListeners[i].OnTouchMove(x, y)
	}
	simlog.FuncOut()
}
382108
func (self *FSock) SendEventWithBody(eventSubclass string, eventParams map[string]string, body string) (string, error) {
	// Event-Name is overrided to CUSTOM by FreeSWITCH,
	// so we use Event-Subclass instead
	eventParams["Event-Subclass"] = eventSubclass
	return self.SendCmdWithArgs(fmt.Sprintf("sendevent %s\n", eventSubclass), eventParams, body)
}
1119195
func (sprite *sprite) AddTouchListener(listener peer.TouchListener) {
	simlog.FuncIn()
	sprite.Sprite.AddTouchListener(listener)
	simlog.FuncOut()
}
133737
func (tp *TouchPeer) AddTouchListener(listener TouchListener) {
	simlog.FuncIn()
	tp.touchListeners = append(tp.touchListeners, listener)
	simlog.FuncOut()
}
842459
func (c *ServiceWorker) DispatchSyncEventWithParams(v *ServiceWorkerDispatchSyncEventParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "ServiceWorker.dispatchSyncEvent", Params: v})
}
1074291
func Aftertouch(channel, key, vel int) *Event {
	return &Event{
		MsgChan:  uint8(channel),
		MsgType:  uint8(EventByteMap["AfterTouch"]),
		Note:     uint8(key),
		Velocity: uint8(vel),
	}
}
284269
func WriteTouchCmd(w io.Writer, key []byte, exptime, opaque uint32) error {
	//fmt.Printf("Touch: key: %v | exptime: %v | totalBodyLength: %v\n", string(key),
	//exptime, totalBodyLength)
	return writeKeyExptimeCmd(w, OpcodeTouch, key, exptime, opaque)
}
227950
func (c *Emulation) SetTouchEmulationEnabled(enabled bool, maxTouchPoints int) (*gcdmessage.ChromeResponse, error) {
	var v EmulationSetTouchEmulationEnabledParams
	v.Enabled = enabled
	v.MaxTouchPoints = maxTouchPoints
	return c.SetTouchEmulationEnabledWithParams(&v)
}
158045
func PointerOver(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "pointerover", Listener: listener}
}
300797
func (c *Page) SetTouchEmulationEnabled(enabled bool, configuration string) (*gcdmessage.ChromeResponse, error) {
	var v PageSetTouchEmulationEnabledParams
	v.Enabled = enabled
	v.Configuration = configuration
	return c.SetTouchEmulationEnabledWithParams(&v)
}
1216142
func WithConnectionEvent(value chan *dispatcher.ConnectionEvent) options.Opt {
	return func(p options.Params) {
		if setter, ok := p.(connectEventChSetter); ok {
			setter.SetConnectEventCh(value)
		}
	}
}
1167619
func ButtonMiddle(p *input.DispatchMouseEventParams) *input.DispatchMouseEventParams {
	return p.WithButton(input.ButtonMiddle)
}
101065
func goMouseButtonCB(window unsafe.Pointer, button, action, mods C.int) {
	w := windows.get((*C.GLFWwindow)(window))
	w.fMouseButtonHolder(w, MouseButton(button), Action(action), ModifierKey(mods))
}