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

Function PiuApplicationFindMenu

modules/piu/All/piuApplication.c:607–624  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

605}
606
607void PiuApplicationFindMenu(PiuApplication* self, xsIntegerValue id)
608{
609 xsMachine* the = (*self)->the;
610 xsIntegerValue c, i, d, j;
611 xsVar(2) = xsReference((*self)->reference);
612 xsVar(2) = xsGet(xsVar(2), xsID_menus);
613 c = xsToInteger(xsGet(xsVar(2), xsID_length));
614 i = (id & 0x0000FF00) >> 8;
615 if ((0 <= i) && (i < c)) {
616 xsVar(2) = xsGetAt(xsVar(2), xsInteger(i));
617 xsVar(2) = xsGet(xsVar(2), xsID_items);
618 d = xsToInteger(xsGet(xsVar(2), xsID_length));
619 j = (id & 0x000000FF) - 1;
620 if ((0 <= j) && (j < d)) {
621 xsVar(2) = xsGetAt(xsVar(2), xsInteger(j));
622 }
623 }
624}
625
626void PiuApplicationKeyDown(PiuApplication* self, xsStringValue string)
627{

Callers 2

PiuApplicationCanMenuFunction · 0.85
PiuApplicationDoMenuFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected