muir@postgres.berkeley.edu (David Muir Sharnoff) (05/05/88)
I want to convert a number of curses programs to X. Has anyone written an X implementation of the curses library? Is anyone working on it? thanks, -Dave muir@ucbvax.berkeley.edu
steve@geac.UUCP (Steve Lane) (05/05/88)
In article <3049@pasteur.Berkeley.Edu> muir@postgres.berkeley.edu (David Muir Sharnoff) writes: >I want to convert a number of curses programs to X. Has anyone >written an X implementation of the curses library? Is anyone >working on it? > >thanks, > >-Dave muir@ucbvax.berkeley.edu 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. Thanks, Steve.
guy@gorodish.Sun.COM (Guy Harris) (05/07/88)
> 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. Why? How many X applications do you know of that make use of *only* those features that could be provided by the mythical "X for a VT100"? This includes not only *output* capabilities, but *input* capabilities as well. You wouldn't get a mouse or an unencoded keyboard in such a system, for example, except perhaps on very specialized terminals. If people really want to write applications that can move between a "curses" and alphanumeric terminal environment, and an X11-style environment, the easiest solutions would seem to be: 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. 2) Run your "curses" application inside an "xterm" window.
guido@cwi.nl (Guido van Rossum) (05/08/88)
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