| 1610 | } |
| 1611 | |
| 1612 | void PiuView_onTouchBegan(xsMachine* the) |
| 1613 | { |
| 1614 | PiuView* self = PIU(View, xsThis); |
| 1615 | PiuApplication* application = (*self)->application; |
| 1616 | if (!application) return; |
| 1617 | xsIntegerValue index = xsToInteger(xsArg(0)); |
| 1618 | PiuCoordinate x = xsToPiuCoordinate(xsArg(1)); |
| 1619 | PiuCoordinate y = xsToPiuCoordinate(xsArg(2)); |
| 1620 | xsNumberValue ticks = xsToNumber(xsArg(3)); |
| 1621 | #if (90 == kPocoRotation) |
| 1622 | PiuCoordinate c = x; |
| 1623 | x = y; |
| 1624 | y = (*application)->coordinates.height - c; |
| 1625 | #elif (180 == kPocoRotation) |
| 1626 | x = (*application)->coordinates.width - x; |
| 1627 | y = (*application)->coordinates.height - y; |
| 1628 | #elif (270 == kPocoRotation) |
| 1629 | PiuCoordinate c = x; |
| 1630 | x = (*application)->coordinates.width - y; |
| 1631 | y = c; |
| 1632 | #endif |
| 1633 | (*self)->updating = 1; |
| 1634 | (*self)->idleTicks = (PiuTick)ticks; |
| 1635 | PiuApplicationTouchBegan(application, index, x, y, ticks); |
| 1636 | PiuApplicationAdjust(application); |
| 1637 | (*self)->updating = 0; |
| 1638 | PiuViewUpdate(self, application); |
| 1639 | PiuApplicationIdleCheck(application); |
| 1640 | (*self)->idleTicks = 0; |
| 1641 | } |
| 1642 | |
| 1643 | void PiuView_onTouchEnded(xsMachine* the) |
| 1644 | { |
nothing calls this directly
no test coverage detected