| 696 | } |
| 697 | |
| 698 | void PiuApplicationMouseMoved(PiuApplication* self, PiuCoordinate x, PiuCoordinate y) |
| 699 | { |
| 700 | PiuContent* former = (*self)->hover; |
| 701 | PiuContent* current = (*(*self)->dispatch->hit)(self, x, y); |
| 702 | if (former != current) { |
| 703 | (*self)->cursorShape = 0; |
| 704 | while (former) { |
| 705 | if (PiuBehaviorOnMouseID(former, xsID_onMouseExited, x, y)) |
| 706 | break; |
| 707 | former = (PiuContent*)((*former)->container); |
| 708 | } |
| 709 | (*self)->hover = current; |
| 710 | while (current) { |
| 711 | if (PiuBehaviorOnMouseID(current, xsID_onMouseEntered, x, y)) |
| 712 | break; |
| 713 | current = (PiuContent*)((*current)->container); |
| 714 | } |
| 715 | PiuViewChangeCursor((*self)->view, (*self)->cursorShape); |
| 716 | } |
| 717 | else { |
| 718 | while (current) { |
| 719 | if (PiuBehaviorOnMouseID(former, xsID_onMouseMoved, x, y)) |
| 720 | break; |
| 721 | current = (PiuContent*)((*current)->container); |
| 722 | } |
| 723 | PiuViewChangeCursor((*self)->view, (*self)->cursorShape); |
| 724 | } |
| 725 | (*self)->mouse.x = x; |
| 726 | (*self)->mouse.y = y; |
| 727 | } |
| 728 | |
| 729 | void PiuApplicationMouseScrolled(PiuApplication* self, PiuCoordinate dx, PiuCoordinate dy) |
| 730 | { |
no test coverage detected