Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
NeWS
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Design == NeWS started by implementing a PostScript interpreter running in a [[cooperative multitasking]] fashion, since, unlike PostScript in a printer, NeWS would be displaying a number of PostScript programs at the same time on one screen. It also added a complete view hierarchy, based on viewports known as ''canvases'', and a synchronous event distribution system, supporting ''[[Event (computing)|events]]'', ''[[Callback (computer programming)|interests]]'', ''[[Thread (computing)|threads]]'' and ''[[Monitor (synchronization)|monitors]]''. Like the view system in most GUIs, NeWS included the concept of a tree of embedded views along which events were passed. For instance, a mouse click would generate an event that would be passed to the object directly under the mouse pointer, say a button. If this object did not respond to the event, the object "under" the button would then receive the message, and so on. NeWS included a complete model for these events, including timers and other automatic events, input queues for devices such as [[computer mouse|mice]] and [[computer keyboard|keyboard]]s, and other functionality required for full interaction. The input handling system was designed to provide strong event synchronization guarantees that were not possible with asynchronous protocols like X.<ref>{{cite web|url=http://www.chilton-computing.org.uk/inf/literature/books/wm/p005.htm|title=SunDew - A Distributed and Extensible Window System}}</ref> To support user interface widgets, NeWS expanded the original PostScript [[Stack-oriented programming|stack-based language]] into a complete [[object-oriented programming|object-oriented]] (OO) programming style with [[Inheritance (object-oriented programming)|inheritance]]. This eliminated the need for an external OO language to build a complete application. Since all of these additions were implemented as extensions to PostScript, it was possible to write simple PostScript code that would result in a running, onscreen, interactive program. Two popular demonstration programs were an onscreen clock, which required about two pages of code, and a program which drew a pair of eyes that followed the cursor as it moved around the screen. The eyeball program was shown at [[SIGGRAPH]] in 1988 and was the inspiration for the later well-known X application [[xeyes]]. NeWS included several libraries of user interface elements ([[graphical widget|widgets]]), themselves written in NeWS. These widgets ran all of their behavior in the NeWS interpreter, and only required communications to an outside program (or more NeWS code) when the widget demanded it. For example, a toggle button's display routine can query the button's state (pressed or not) and change its display accordingly. The button's PostScript code can also react to mouse clicks by changing its state from "pressed" to "not pressed" and vice versa. All this can happen in the windowing server without interaction with the client program, and only when the mouse is released on the button will an event be sent off for handling. This was more sophisticated than the [[X Window System]] server model, which can only report "mouse button was clicked down here", "mouse is now here", "mouse button was released here" events to a client, which then has to figure out if the event is in the button, switch the state, and finally instruct the server to display the new state. If client and server are not on the same machine, these interactions must travel over the network, which results in [[round-trip delay time|a delay in responding]]. [[File:The NeWS Toolkit screen snapshot.gif|thumb|right|TNT-based applications]] The best example of such a library is TNT (''The NeWS Toolkit'') which Sun released in 1989. Sun also shipped an earlier "Lite" toolkit intended for example purposes and making small programs.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)