Path: utzoo!mnetor!uunet!mcvax!guido From: guido@cwi.nl (Guido van Rossum) Newsgroups: comp.windows.x Subject: Re: Anyone have (or going to have) a X implementation of curses? Message-ID: <307@piring.cwi.nl> Date: 8 May 88 11:50:13 GMT References: <3049@pasteur.Berkeley.Edu> <2698@geac.UUCP> <52310@sun.uucp> Reply-To: guido@cwi.nl (Guido van Rossum) Organization: The Royal Society for Prevention of Cruelty to Amoebae Lines: 25 Summary: warning: this is a plug In article <52310@sun.uucp> guy@gorodish.Sun.COM (Guy Harris) writes: >> Does anyone have any helpful suggestions for the reverse operation, i.e. an >> X to curses (or similar) conversion? Obviously, curses cannot cope with all >> of X's features, but it would be desirable to implement at least a subset >> for non-graphic terminals that can handle curses but not X. > > 1) Solve this at a higher level - develop a forms package with two > implementations, one atop "curses" and one atop X11/Xt or whatever, > and implement the application atop this forms package. I have done just this in a package I call 'STDWIN'. It presents the application programmer with a window-based environment: menus, events, etc., even exposures; scroll bars are handled automatically; there is a library implementing it for X11, one for the Mac, one for the Atari ST (just because we happened to own one, not because I like it) and one for ASCII terminals using termcap. The package contains simple graphical output primitives (draw lines, boxes, arcs) which are of course unimplemented in the termcap version, but the text output primitives are well-suited for use on all kinds of display. As for the mouse, well, if your application uses it, it may not work on ASCII terminals, but it is easy to make this optional (using arrow keys and other ways of navigation). -- Guido van Rossum, Centre for Mathematics and Computer Science (CWI), Amsterdam guido@piring.cwi.nl or mcvax!piring!guido or guido%piring.cwi.nl@uunet.uu.net