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

Function PiuDebugMachineWindowProc

tools/xsbug/DebugBehavior.c:596–627  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

594}
595#elif mxWindows
596LRESULT CALLBACK PiuDebugMachineWindowProc(HWND window, UINT message, WPARAM wParam, LPARAM lParam)
597{
598 if (message == WM_USER) {
599 PiuDebugMachine self = (PiuDebugMachine)GetWindowLongPtr(window, 0);
600 if (WSAGETSELECTEVENT(lParam) == FD_READ) {
601 int length = recv(self->socket, self->buffer, XS_BUFFER_COUNT, 0);
602 if (length > 0) {
603 self->buffer[length] = 0;
604 //fprintf(stderr, "%s", self->buffer);
605 xsBeginHost(self->the);
606 {
607 xsVars(4);
608 PiuDebugMachineParse(self, self->buffer, length);
609
610 xsResult = xsGet(xsGlobal, xsID_application);
611 PiuApplication* application = PIU(Application, xsResult);
612 PiuApplicationAdjust(application);
613 }
614 xsEndHost(self->the);
615 return TRUE;
616 }
617 }
618 PiuDebugMachineDisconnect(self);
619 xsBeginHost(self->the);
620 {
621 (void)xsCall0(self->thisSlot, xsID_onDisconnected);
622 }
623 xsEndHost(self->the);
624 return TRUE;
625 }
626 return DefWindowProc(window, message, wParam, lParam);
627}
628#endif
629
630void PiuDebugMachineCreate(xsMachine* the)

Callers

nothing calls this directly

Calls 3

PiuDebugMachineParseFunction · 0.85
PiuApplicationAdjustFunction · 0.85

Tested by

no test coverage detected