I once did something similar, but not through FFI. I directly used the terminfo database instead (also used by curses, man terminfo for details). I guess this what you mean by ANSI terminal sequences. But I was using only basic capabilities like moving the cursor, beeping, or deleting characters or lines, switching to reverse video, etc.
Bernard. On 27/02/2018 04:39, michael.norr...@data61.csiro.au wrote:
Has anyone used the FFI interface or similar to link libcurses or similar? I could try to talk ANSI terminal sequences directly, but querying terminal state with these seems pretty painful. (At the very least one has to put standard input into a non-blocking state, and I found the Basis documentation on how I might do this very confusing.) And then one is breaking the very abstraction that curses is trying to provide... As a bare minimum for example, I'd like to get the width of the current terminal. Michael _______________________________________________ polyml mailing list polyml@inf.ed.ac.uk http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
_______________________________________________ polyml mailing list polyml@inf.ed.ac.uk http://lists.inf.ed.ac.uk/mailman/listinfo/polyml