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

Function PiuContentIdle

modules/piu/All/piuContent.c:329–344  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

327}
328
329void PiuContentIdle(void* it, PiuInterval interval)
330{
331 PiuContent* self = it;
332 PiuIdle selfIdle = PiuContentUseIdle(self);
333 PiuContentSetTime(self, selfIdle->time + interval);
334 selfIdle = PiuContentUseIdle(self);
335 if (selfIdle->duration && (selfIdle->time == selfIdle->duration)) {
336 if ((*self)->flags & piuLoop) {
337 selfIdle->time = 0;
338 }
339 else {
340 PiuContentStop(self);
341 PiuBehaviorOnFinished(self);
342 }
343 }
344}
345
346void PiuContentInvalidate(void* it, PiuRectangle area)
347{

Callers

nothing calls this directly

Calls 3

PiuContentUseIdleFunction · 0.85
PiuContentSetTimeFunction · 0.85
PiuContentStopFunction · 0.85

Tested by

no test coverage detected