这些WinAPI函数是否具有linux控制台(/终端)等价物:
GetConsoleScreenBufferInfo // for getting cursor position
SetConsoleCursorPosition // for setting cursor position
SetConsoleWindowInfo // for resizing console window or hiding cursor
ReadConsoleOutputCharacter // for reading the character at some position
ReadConsoleOutputAttribute // for reading color info of the character at some position
WriteConsoleOutputAttribute // for changing color info of the character at some position
答案 0 :(得分:3)
您可以尝试使用NCurses
获取光标位置
~$ echo -e "\033[6n"
用于调整控制台窗口的大小
wmctrl -r "Mozilla Firefox" -e <G>,<X>,<Y>,<W>,<H>
答案 1 :(得分:1)