Date: Thu, 03 Feb 2000 09:50:45 +1100 From: Harry Woodward-Clarke <Harry.Woodward-Clarke@S1.com> Cc: Roelof Osinga <roelof@nisser.com>, David Banning <tracker@worldy.com>, questions@FreeBSD.ORG Subject: Re: Help writing for ASCII terminals Message-ID: <3898B4C5.A4B8E058@S1.com> References: <000801bf695b$1136aec0$b71e05d1@tracker> <3898B0C4.A7CE0981@nisser.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi guys, > > > > I am interested in writing an application with graphics / text > > boxes for > > ASCII terminals. > > It seems xterm communicates through ASCII, but it seems to me that > > a > > non-xterminal > > couldn't even fire-up an X11 program - would it? > > > > Is there a widget set (maybe non-X11) out there that would help me > > do this? > > I think it would be better to get some experience with glass TTY's > first. Especially regarding the 'graphics' thing. Get your hands > on an Ann-Arbor, DEC, Televideo, Wyse, IBM, whatever terminal > and browse through its manual. Look into the termcap file if you > like. > > Basically the only graphics they've got in common is things like > /\+-| and like chars like = and _. > > It could probably fire up a X11 program, but would not be able to > render its output. > There is a library of terminal control functions under the generic title "curses" ($ man curses). Any half way decent book on Programming in C on Unix should introduce you to the routines. Unfortunately, I don't think they allow curves and irregular objects. Just straight lines (boxes, etc.), but they do work on just about any terminal defined in the termcap. Failing that, or rather, to supplement that, if you are going to be always using a specific family of terminals (e.g. VT220 or higher) you can get hold of the programming guide for that beast, and then output the specific graphic commands from within your program(s). Better, would be to write your main code to a generic 'graphic device', and then build up a library of modules to interpret that stuff to the specific terminals as you go. In fact, I would dare say that there are already libraries of these around somewhere! This wheel has got to have been invented before - many times over! hth, haxxa To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3898B4C5.A4B8E058>