Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!texbell!ficc!peter From: peter@ficc.uu.net (Peter da Silva) Newsgroups: comp.lang.forth Subject: Re: Declining Forth popularity. Message-ID: <7427@ficc.uu.net> Date: 27 Dec 89 15:48:40 GMT References: <8912270501.AA01856@jade.berkeley.edu> Reply-To: peter@ficc.uu.net (Peter da Silva) Organization: Xenix Support, FICC Lines: 55 Lest anyone think I'm a Forth hater in drag, I'd like to point out that the following is not really relevent: > If Forth comes up with its own standard, who will use it? > Forth systems for the Macintosh use the Macintosh window system. > Successful Forth systems for the Amiga use the Amiga window system. > In the Macintosh marketplace, anything that doesn't conform to the > Mac user interface is despised. A standard *program interface* to the windowing system can be devised just as easily as a standard program interface to, say, files. A stringy floppy, a diskette drive, and a UNIX file system all have radically different low-level interfaces. But you can look at them all as block files. Similarly, a standard program interface to windowing could be made. It might be fairly complex to implement, but something like the following should be made to run on X, Mac, Intuition, GEM, etcetera... WINDOW MyNewWindow : InitMyNewWindow SCREENSIZE MyNewWindow SetSize HOME MyNewWindow SetPosition DESKTOP " Open" MyNewWindow SetMenu OpenMenu ! DESKTOP " New" MyNewWindow SetMenu NewMenu ! DESKTOP " Close" MyNewWindow SetMenu CloseMenu ! BACKINGSTORE RESIZABLE DRAGGABLE HIDEABLE + + + MyNewWindow SetAttributes ; : HandleMyNewWindow ( event --- ) dup GetEventType SWITCH CASE MouseButtonUp DO 0 MyNewWindow SetPen CASE MouseButtonDown DO 1 MyNewWindow SetPen CASE MouseMove DO dup GetXPos over GetYPos MyNewWindow PlotPixel CASE MenuSelect DO dup GetMenuID SWITCH CASE OpenMenu DO MyNewWindow HandleOpenEvent CASE CloseMenu DO 1 TerminateFlag C! CASE NewMenu DO HOME SCREENSIZE 0 MyNewWindow RectFill ENDSW ENDSW drop ; -- `-_-' Peter da Silva. +1 713 274 5180. . 'U` Also or . "It was just dumb luck that Unix managed to break through the Stupidity Barrier and become popular in spite of its inherent elegance." -- gavin@krypton.sgi.com