Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ windows(1) — SunOS 0.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sizesh(1)

WINDOWS(1)  —  User’s Manual — Commands

NAME

windows − start the (preliminary) window environment

SYNOPSIS

[ setenv SHELL /bin/sh; setenv PATH $PATH:/usr/win ] (see bug 1 below)
/usr/win/windows

DESCRIPTION

Windows starts up the Sun window environment and awaits the user’s directions.  (If the window system has never been run on this machine, then the proper devices have to be added to /dev before windows is invoked.  This may be done by the superuser, using the command file /usr/win/installWindows.)  The indications that the system is ready are 1) the screen is painted with a light gray, and 2) the cursor starts tracking the mouse; its pointer is an arrow aimed to the upper left.  The pointer may not be visible, if the cursor is positioned off the screen; moving the mouse in a wide circle should serve to bring the pointer onto the screen. 

Menus

Communication to the window environment is via pop-up menus.  These are invoked by pressing the menu (right) button on the mouse and holding it down.  (See bug 2 below.)  A menu is painted on the screen near the current location of the mouse, and the pointer is changed to a right-pointing arrow.  As long as the menu button is held down, the menu will remain on the screen, and the pointer will track the mouse.  If the pointer enters a menu item which can be invoked, that item video-inverts, but nothing else happens while the menu button is kept down.  Releasing the button while the pointer is in a menu item invokes that menu item: the menu is removed from the screen, and processing of that item begins. 

Window Manager

The menu that comes up over the background gray belongs to the Window Manager.  Its commands are:

New Shell
Create a new Shell Tool. A new window is created on the screen, running a new copy of the shell. The window is positioned over most of the left half of the screen, on top of everything else in the same region.

New Graphics
Create a new Graphics Demo Tool. A new window appropriate for running graphics demos is created on the right middle of the screen, on top of anything it overlaps.

Exit
Exit the window system. All windows are closed, and the processes they enclose are killed. The user is returned to the shell which accepted the invocation of windows. 

ReDisplay All
All the contents of the screen are redrawn. This can be used to repair damage done by processes that wrote to the screen without consulting the window system (e.g. system error messages).

Tool Manager

Operations on a particular window, such as moving it or changing its size, are invoked via the Tool Manager menu.  This is displayed in response to the menu button when the mouse pointer is inside a window.  Tool Manager commands are:

Close (or Open)
The current window is shrunk to a small (c. 1 x 2 cm.) placeholder on the screen. Its process(es) continues to run. Closed windows are placed in the lower left of the screen, filling in rows to the right, and then bottom-to-top, in the order they are closed. When reopened, windows return to the position from which they were closed. A closed window may be moved just like an open one; if it is reopened and closed again, it returns to its last closed position.

When the Tool Menu is brought up over a closed window, this item reads Open, and serves to reverse the process. 

Move
Change the location of a window on the screen, without affecting its size or contents. When invoked, Move will instruct the user to grasp the window by depressing and holding down the left mouse button, or to cancel the operation by pressing the middle or right button. The instructions are removed from the screen when a mouse button is depressed, and the window is outlined by a box which will track the mouse as long as the left button is held down. This box should be positioned where the window should go and the mouse button released; the window will be repainted in its new location, and its old location repaired. The level of the window (on top of or underneath others) is not affected.

Stretch
Change the size of a window on the screen. As with Move, instructions are posted for the user until a mouse button push either starts the Stretch or cancels it. The position of the pointer when the left button is pressed determines how the window is stretched: If it is near a corner, both of the sides that form that corner are adjusted; the opposite corner remains fixed. If it is in the middle third of a side, then only that side is adjusted; all 3 other sides remain fixed. The use of the bounding box, and behavior with respect to window level, is the same as for Move

Expose
The window is brought to “the top of the heap”: The whole window becomes visible, and occludes any window it happens to overlap on the screen. Its position on the screen does not change.

Hide
The window is put on the “bottom of the heap”: it is occluded by any window which overlaps it. Its position on the screen does not change.

ReDisplay
The contents of the current window are redrawn.

Multiple Menus

When several menus may legitimately be used in a given circumstance, they are presented in a pile, with the current one on top so its items are visible.  Another menu may be brought to the top, making its items available, by selecting its name while continuing to hold the menu button down.  That is, the user should move the pointer to the name of the desired menu, and without releasing the menu button, press and release the select (left) button.  The stack of menus is repainted with the selected menu on top, and menu operations may continue. 

The only occasion when this feature appears at present is when the Tool Manager menu is brought up over a tool window; the Window Manager menu is available behind it. 

Interacting with Tools

Both the Shell Tool and the Graphics Demo Tool come up running a shell, using the window as a terminal for input and output.  Tools added later will run other programs, and interact in other fashions.  When the mouse pointer is moved into a tool window, the cursor changes to a cross shape.  Keyboard input is directed to the window which contains the cursor at the time the characters are typed; characters typed to the background are thrown away.  It is reasonable to type to one window, move the mouse, and type to another window before the first characters are echoed and processed; the type-ahead is distributed correctly. 

Thus, to run a program in a window, move the pointer into the window when its shell is waiting for input, and type the program name and arguments as usual.  Demos which draw pictures should be run in the Graphics Demo Tool; the two distributed with the first release of windows are

/usr/win/bouncedemo,
which does the bouncing ball in the graphics window, and

/usr/win/spheresdemo,
which laboriously computes a shaded sphere. This illustrates the use of retained windows, whose pixels are saved someplace in addition to the screen, so they may be repainted without recomputation. 

Programs which pay attention to the size of the terminal screen are likely to be confused by the window system, since the window size is not constrained to standard terminal dimensions, and indeed may change at any time.  Some of these programs (e.g. vi, more) inspect the TERMCAP shell variable as they start up, and so may be informed of the current size of the window.  The program sizesh (sizesh(1)) is useful in this regard.  Changes which occur after the program has started will not be noticed, however. 

Getting Out

Exit a single tool by exiting its shell (e.g., by typing ^D to it).  Exit the whole window system by invoking the “Exit” menu item in the Window Manager menu.  It may be wise to ensure that all windows are in a safe condition (e.g., editors have written out all changes) first. 

AUTHOR

Steve Evans, Jerry Farrell

SEE ALSO

sizesh(1)
program for determining current window dimensions and setting the TERMCAP variable appropriately

FILES

/dev/gfxxx
/usr/win/installWindows

BUGS

The first release is intended primarily for demo use; it is known to be buggy in a number of respects, and programmer- and user-interfaces are subject to change.  In particular,

1)Communication among the window system, shells, and client programs is not fully implemented.  In order to run graphics demos, it is necessary to use the Bourne shell (/bin/sh), since csh closes some files the window system needs.  To make vi work, sizesh must be run after every change to the window’s dimensions.  For users who insist on using csh, a sizecsh corresponding to sizesh exists, but has glitches.  (These cautions are not absolute − this document is being written in the window system using csh − but they should be obeyed to avoid embarrasment in demos.) 

2)The mouse currently does not report button events until it moves; so when you try to bring up a menu, invoke a menu item, or indicate a new window position to Move or Stretch, you have to move the mouse a little after the button-down or -up before anything happens. 

3)In the system configuration as distributed, no more than 3 windows may be in existence at a time.  Attempts to create the fourth will fail, glitching the screen but not destroying the window system.  The display may be repaired with the ReDisplay All menu command.  This limitation is due to the number of devices named ttypn and ptypn in /dev.  Adding aditional pairs of devices will increase the number of windows that can be created. 

4)Exit should require confirmation before it trashes your world. 

5)The pointer should be ORed onto the screen, rather than XORed as at present. 

6)Terminal emulation is usable, but hardly solid.  Repaints after uncovering portions of the window are sometimes incorrect.  The bottom of the window can be stretched up above the typein cursor, which will then stay out of sight until clear or echoing a ^L clears the window.  Growing a window uncovers garbage left over from earlier lines. 

Sun System Release 0.3  —  17 February 1983

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026