| 594 | } |
| 595 | #elif mxWindows |
| 596 | LRESULT 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 | |
| 630 | void PiuDebugMachineCreate(xsMachine* the) |
nothing calls this directly
no test coverage detected