Reputation: 6936
I'd like to write an application (in C) that uses the terminal of a *nix OS as its GUI. I mean an application of the kinds of emacs, vi etc. that take up the whole terminal window and jump back to the input prompt after quitting.
How would you go about doing that, preferably in C? Can someone point me to a tutorial covering that?
Upvotes: 8
Views: 15562
Reputation: 10579
Throwing in alternate solutions so that this question thread does not look so monotonic:
Upvotes: 2
Reputation: 1202
You need to use ncurses:
http://en.wikipedia.org/wiki/Ncurses
http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/
It is available on all major distros.
Upvotes: 8
Reputation: 121820
Use a library like ncurses
, it is specifically designed for this purpose.
Upvotes: 2