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

Function PiuView_onMessage

modules/piu/MC/piuView.c:1575–1595  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1573}
1574
1575void PiuView_onMessage(xsMachine* the)
1576{
1577 PiuView* self = PIU(View, xsThis);
1578 PiuApplication* application = (*self)->application;
1579 if (!application) return;
1580 (*self)->updating = 1;
1581 (*self)->idleTicks = PiuViewTicks(self);
1582 if ((*application)->behavior) {
1583 xsVars(2);
1584 xsVar(0) = xsReference((*application)->behavior);
1585 if (xsFindResult(xsVar(0), xsID_onMessage)) {
1586 xsVar(1) = xsReference((*application)->reference);
1587 (void)xsCallFunction2(xsResult, xsVar(0), xsVar(1), xsArg(0));
1588 }
1589 }
1590 PiuApplicationAdjust(application);
1591 (*self)->updating = 0;
1592 PiuViewUpdate(self, application);
1593 PiuApplicationIdleCheck(application);
1594 (*self)->idleTicks = 0;
1595}
1596
1597void PiuView_onQuit(xsMachine* the)
1598{

Callers

nothing calls this directly

Calls 3

PiuApplicationAdjustFunction · 0.85
PiuApplicationIdleCheckFunction · 0.85
PiuViewTicksFunction · 0.70

Tested by

no test coverage detected