Getting the terminal width and height is something you cannot do presently with the Terminal trait. It prevents implementation of something like termbox on top of Terminal trait.
The linux implementation looks something like (from termbox)
struct winsize sz;
memset(&sz, 0, sizeof(sz));
ioctl(inout, TIOCGWINSZ, &sz);
termw = sz.ws_col;
termh = sz.ws_row;
whilst in windows the relevant function is kernel32::GetConsoleScreenBufferInfo
Getting the terminal width and height is something you cannot do presently with the
Terminaltrait. It prevents implementation of something like termbox on top ofTerminaltrait.The linux implementation looks something like (from termbox)
whilst in windows the relevant function is
kernel32::GetConsoleScreenBufferInfo