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

Function PiuText_create

modules/piu/All/piuText.c:1103–1124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1101}
1102
1103void PiuText_create(xsMachine* the)
1104{
1105 PiuText* self;
1106 xsVars(piuTextDepth);
1107 xsSetHostChunk(xsThis, NULL, sizeof(PiuTextRecord));
1108 self = PIU(Text, xsThis);
1109 (*self)->the = the;
1110 (*self)->reference = xsToReference(xsThis);
1111 xsSetHostHooks(xsThis, (xsHostHooks*)&PiuTextHooks);
1112 (*self)->dispatch = (PiuDispatch)&PiuTextDispatchRecord;
1113 (*self)->recordSize = PiuRecordSize(sizeof(PiuTextRecord));
1114 (*self)->flags = piuVisible;
1115 PiuContentDictionary(the, self);
1116
1117 PiuTextBufferNew(the, 512);
1118 (*self)->lineBuffer = PIU(TextBuffer, xsResult);
1119 PiuTextBufferNew(the, 512);
1120 (*self)->nodeBuffer = PIU(TextBuffer, xsResult);
1121
1122 PiuTextDictionary(the, self);
1123 PiuBehaviorOnCreate(self);
1124}
1125
1126void PiuText_get_blocks(xsMachine *the)
1127{

Callers

nothing calls this directly

Calls 4

PiuContentDictionaryFunction · 0.85
PiuTextBufferNewFunction · 0.85
PiuTextDictionaryFunction · 0.85
PiuBehaviorOnCreateFunction · 0.85

Tested by

no test coverage detected