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

Function PiuApplicationMouseMoved

modules/piu/All/piuApplication.c:698–727  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

696}
697
698void 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
729void PiuApplicationMouseScrolled(PiuApplication* self, PiuCoordinate dx, PiuCoordinate dy)
730{

Callers 2

PiuWindowProcFunction · 0.85

Calls 2

PiuBehaviorOnMouseIDFunction · 0.85
PiuViewChangeCursorFunction · 0.50

Tested by

no test coverage detected