| 316 | } |
| 317 | |
| 318 | void PiuApplicationTouchBegan(PiuApplication* self, xsIntegerValue index, PiuCoordinate x, PiuCoordinate y, xsNumberValue ticks) |
| 319 | { |
| 320 | if (index < (*self)->touchLinkCount) { |
| 321 | PiuFlags touchFlag = 1 << index; |
| 322 | PiuTouchLink* link; |
| 323 | PiuContent* content; |
| 324 | link = (*self)->touchLinks[index]; |
| 325 | (*link)->content = content = (*(*self)->dispatch->hit)(self, x, y); |
| 326 | if (content) { |
| 327 | if (((*content)->touches == 0) || ((*content)->flags & piuMultipleTouch)) |
| 328 | (*content)->touches |= touchFlag; |
| 329 | content = (PiuContent*)((*content)->container); |
| 330 | while (content) { |
| 331 | if (((*content)->flags & piuActive) && ((*content)->flags & piuBackgroundTouch)) { |
| 332 | if (((*content)->touches == 0) || ((*content)->flags & piuMultipleTouch)) |
| 333 | (*content)->touches |= touchFlag; |
| 334 | } |
| 335 | content = (PiuContent*)((*content)->container); |
| 336 | } |
| 337 | } |
| 338 | link = (*self)->touchLinks[index]; |
| 339 | content = (*link)->content; |
| 340 | if (content) { |
| 341 | PiuTouchLinkAppendSample(link, x, y, ticks); |
| 342 | while (content) { |
| 343 | if ((*content)->touches & touchFlag) |
| 344 | PiuBehaviorOnTouchBegan(content, index, x, y, ticks, link); |
| 345 | content = (PiuContent*)((*content)->container); |
| 346 | } |
| 347 | } |
| 348 | } |
| 349 | PiuViewReschedule((*self)->view); |
| 350 | } |
| 351 | |
| 352 | void PiuApplicationTouchEnded(PiuApplication* self, xsIntegerValue index, PiuCoordinate x, PiuCoordinate y, xsNumberValue ticks) |
| 353 | { |
no test coverage detected