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

Function PiuContentDictionary

modules/piu/All/piuContent.c:85–274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85void PiuContentDictionary(xsMachine* the, void* it)
86{
87 PiuContent* self = it;
88 xsBooleanValue boolean;
89 xsIntegerValue integer;
90 xsNumberValue number;
91
92//@@ remove this
93if (0 == (*self)->recordSize)
94 xsUnknownError("size not initialized");
95
96 if (xsFindBoolean(xsArg(1), xsID_active, &boolean)) {
97 if (boolean)
98 (*self)->flags |= piuActive;
99 else
100 (*self)->flags &= ~piuActive;
101 }
102 if (xsFindBoolean(xsArg(1), xsID_backgroundTouch, &boolean)) {
103 if (boolean)
104 (*self)->flags |= piuBackgroundTouch;
105 else
106 (*self)->flags &= ~piuBackgroundTouch;
107 }
108 if (xsFindBoolean(xsArg(1), xsID_exclusiveTouch, &boolean)) {
109 if (boolean)
110 (*self)->flags |= piuExclusiveTouch;
111 else
112 (*self)->flags &= ~piuExclusiveTouch;
113 }
114 if (xsFindBoolean(xsArg(1), xsID_multipleTouch, &boolean)) {
115 if (boolean)
116 (*self)->flags |= piuMultipleTouch;
117 else
118 (*self)->flags &= ~piuMultipleTouch;
119 }
120 if (xsFindBoolean(xsArg(1), xsID_visible, &boolean)) {
121 if (boolean)
122 (*self)->flags |= piuVisible;
123 else
124 (*self)->flags &= ~piuVisible;
125 }
126
127 if (xsFindResult(xsArg(1), xsID_anchor)) {
128 if (xsTest(xsArg(0))) {
129 xsSetAt(xsArg(0), xsResult, xsThis);
130 }
131 }
132 if (xsFindResult(xsArg(1), xsID_Behavior)) {
133 if (xsIsInstanceOf(xsResult, xsFunctionPrototype)) {
134 fxPush(xsResult);
135 fxNew(the);
136 fxRunCount(the, 0);
137 xsResult = fxPop();
138 (*self)->behavior = xsToReference(xsResult);
139 }
140 }
141 else if (xsFindResult(xsArg(1), xsID_behavior)) {
142 if (xsIsInstanceOf(xsResult, xsObjectPrototype)) {

Callers 15

PiuRoundRect_createFunction · 0.85
PiuQRCode_createFunction · 0.85
PiuInverter_createFunction · 0.85
PiuSVGImage_createFunction · 0.85
PiuScreenBuffer_createFunction · 0.85
PiuText_createFunction · 0.85
PiuScroller_createFunction · 0.85
PiuLayout_createFunction · 0.85
PiuPort_createFunction · 0.85
PiuLabel_createFunction · 0.85
PiuRow_createFunction · 0.85
PiuApplication_createFunction · 0.85

Calls 7

fxNewFunction · 0.85
fxRunCountFunction · 0.85
PiuContent_set_nameAuxFunction · 0.85
PiuContentSetDurationFunction · 0.85
PiuContentSetFractionFunction · 0.85
PiuContentSetIntervalFunction · 0.85
PiuContentSetTimeFunction · 0.85

Tested by

no test coverage detected