MCPcopy Create free account
hub / github.com/WheretIB/nullc / SetConsoleCursorPos

Function SetConsoleCursorPos

NULLC/translation/std_io_bind.cpp:90–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90void SetConsoleCursorPos(int x, int y, void* unused)
91{
92#if !defined(_WIN32)
93 nullcThrowError("SetConsoleCursorPos: supported only under Windows");
94#else
95 if(x < 0 || y < 0)
96 {
97 nullcThrowError("SetConsoleCursorPos: Negative values are not allowed");
98 return;
99 }
100 COORD coords;
101 coords.X = (short)x;
102 coords.Y = (short)y;
103 HANDLE conStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
104 SetConsoleCursorPosition(conStdOut, coords);
105#endif
106}
107
108void GetKeyboardState(NULLCArray<char > state, void* unused)
109{

Callers

nothing calls this directly

Calls 1

nullcThrowErrorFunction · 0.70

Tested by

no test coverage detected