X-Git-Url: https://git.josue.xyz/?p=VSoRC%2F.git;a=blobdiff_plain;f=node_modules%2Fnode-pty%2Fdeps%2Fwinpty%2Fmisc%2FSelectAllTest.cc;fp=node_modules%2Fnode-pty%2Fdeps%2Fwinpty%2Fmisc%2FSelectAllTest.cc;h=0000000000000000000000000000000000000000;hp=a6c27739d8007cff6a34a5df1c926f9fe3a474ac;hb=5e96dd57ddd883604e87f62bdddcb111c63a6e1a;hpb=acb5f682a2b75b972710cabd81658f63071324b0 diff --git a/node_modules/node-pty/deps/winpty/misc/SelectAllTest.cc b/node_modules/node-pty/deps/winpty/misc/SelectAllTest.cc deleted file mode 100644 index a6c2773..0000000 --- a/node_modules/node-pty/deps/winpty/misc/SelectAllTest.cc +++ /dev/null @@ -1,45 +0,0 @@ -#define _WIN32_WINNT 0x0501 -#include -#include - -#include "../src/shared/DebugClient.cc" - -const int SC_CONSOLE_MARK = 0xFFF2; -const int SC_CONSOLE_SELECT_ALL = 0xFFF5; - -CALLBACK DWORD pausingThread(LPVOID dummy) -{ - HWND hwnd = GetConsoleWindow(); - while (true) { - SendMessage(hwnd, WM_SYSCOMMAND, SC_CONSOLE_SELECT_ALL, 0); - Sleep(1000); - SendMessage(hwnd, WM_CHAR, 27, 0x00010001); - Sleep(1000); - } -} - -int main() -{ - HANDLE out = GetStdHandle(STD_OUTPUT_HANDLE); - CONSOLE_SCREEN_BUFFER_INFO info; - - GetConsoleScreenBufferInfo(out, &info); - COORD initial = info.dwCursorPosition; - - CreateThread(NULL, 0, - pausingThread, NULL, - 0, NULL); - - for (int i = 0; i < 30; ++i) { - Sleep(100); - GetConsoleScreenBufferInfo(out, &info); - if (memcmp(&info.dwCursorPosition, &initial, sizeof(COORD)) != 0) { - trace("cursor moved to [%d,%d]", - info.dwCursorPosition.X, - info.dwCursorPosition.Y); - } else { - trace("cursor in expected position"); - } - } - return 0; -}