MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / PiuView_onTouchMoved

Function PiuView_onTouchMoved

modules/piu/MC/piuView.c:1674–1696  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1672}
1673
1674void PiuView_onTouchMoved(xsMachine* the)
1675{
1676 PiuView* self = PIU(View, xsThis);
1677 PiuApplication* application = (*self)->application;
1678 if (!application) return;
1679 xsIntegerValue index = xsToInteger(xsArg(0));
1680 PiuCoordinate x = xsToPiuCoordinate(xsArg(1));
1681 PiuCoordinate y = xsToPiuCoordinate(xsArg(2));
1682 xsNumberValue ticks = xsToNumber(xsArg(3));
1683#if (90 == kPocoRotation)
1684 PiuCoordinate c = x;
1685 x = y;
1686 y = (*application)->coordinates.height - c;
1687#elif (180 == kPocoRotation)
1688 x = (*application)->coordinates.width - x;
1689 y = (*application)->coordinates.height - y;
1690#elif (270 == kPocoRotation)
1691 PiuCoordinate c = x;
1692 x = (*application)->coordinates.width - y;
1693 y = c;
1694#endif
1695 PiuApplicationTouchMoved(application, index, x, y, ticks);
1696}
1697

Callers

nothing calls this directly

Calls 1

PiuApplicationTouchMovedFunction · 0.85

Tested by

no test coverage detected