full screen text
2 posts in topic
Flat View  Flat View

Posted By:   Andrew_Stitt
Posted On:   Thursday, June 28, 2001 09:31 AM

how do you get control over the terminal display in the same way that for example emacs vi or pine does?

they all seem to have control over all the characters on the screen in a random access sort of way, I cant figure out how I can do that. Is there a way to get at the display through native methods? if so how? or is there a way to extend OutputStream to have random access?


Re: full screen text

Posted By:   Tim_Rohaly  
Posted On:   Sunday, July 8, 2001 08:33 PM

Control over the screen is a terminal-dependent operation.
Specifically, terminals or terminal emulators each have
their own specific set of commands (and escape characters
for those commands) that a program may send in order
to invoke the terminal-specific capabilities. You can also
do this from Java, but it would require you to basically
develop your own terminal capabillites API in order to support
more that one terminal type.

vi (written by Bill Joy!) for instance makes use of the
UNIX termcap database to perform its magic of
writing to any part of a terminal screen, regardless of terminal type.

The curses API under UNIX (written by Ken Arnold!) is
a higher-level program interface to the termcap database - curses
is a way to do what you need in a terminal-independent manner.
There are a number of Java bindings for curses,
see the FAQ at http://www.jguru.com/faq/view.jsp?EID=312906
for links and additional discussion of this problem.

Re: full screen text

Posted By:   Simon_Ablett  
Posted On:   Monday, July 2, 2001 07:59 AM

Neither Vi nor Emacs has control over all of the screen. I assume that you are talking about running them from a console (terminal!!) window (as opposed to running xemacs etc. which opens it's own X-window). To prove this, write a small program to dump to standard out. Run it in the background from your current window and then run vi. Your vi screen will get corrupted by the output from your background process.
About | Sitemap | Contact