Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ win(4) — UTek W2.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

csh(1csh)

stty(1)

tty(1)

ioctl(2)

sigvec(2)

getty(8)

wintext(4)

wingraf(4)

winpop(4)

wincolor(4)

init(8)



WIN(4)              6130 Window Documentation              WIN(4)



NAME
     win - 6130 integrated window manager interface

SYNOPSIS
     #include <winioctl.h>

DESCRIPTION
     NOTE:  This window interface will change in future releases.

     The 6130 display system has a 1024 x 512 pixel frame buffer
     with 640 x 480 pixels displayed.  Sixteen colors can be
     displayed at a time, selected from a palette of 64.  The
     display is a 13 inch visual display screen operating at 60
     Hz, non-interlaced.  The display subsystem has a 32016
     processor with 1/2 to 1 Mb of local memory.

     This section describes both particular special files and the
     terminal drivers used for display manipulation and
     conversational computing.  The display system supports 16
     simultaneous windows.  Each window consists of a title bar
     across the top of the window and the body of the window.
     Three types of windows are available.  Text windows support
     vt52 style character display.  Graphics windows support most
     4014 extended graphics set commands.  Pop up windows are
     used for menu selections.  By default, the right mouse
     button brings up a pop-up menu that can be used to
     manipulate basic window parameters, such as location and
     size.

     Text Windows

     Characters within a text window are 8 pixels wide and 16
     pixels high.  The display can support a maximum of 30 rows
     and 80 columns.  A full screen window contains up to 28
     lines of text.  (There is a display system status line and
     the window title line in addition to the 28 lines of usable
     space.) Text windows support reversed video, underlining,
     two modes of highlighting and simultaneous use of two
     character fonts.

     Text windows include a 280 line scroll buffer on each text
     window.  The scroll buffer is currently 80 characters wide.
     The actual size is subject to change in future releases.
     The plan is to allow 132 characters in width eventially.
     The default programming for function keys F1 through F4 are
     to scroll this window back a page, forward a page, back a
     line and forward a line.

     The center mouse button is used for a simple scroll bar
     mechanism in text windows.  Pressing this buggon changes the
     cursor from a cross to a small box.  Position this box
     within the current window to indicate what aprt of the text



2nd Edition                  Dr. Dum                 s Collection





WIN(4)              6130 Window Documentation              WIN(4)



     you want to see and release the button.  The top left corner
     of the window is the "oldest" text, the bottom left corner
     is the "newest" text.  You can position the box outside the
     current window; the position will be clipped to the window
     boundaries.  Both vertical and horizontal scrolling is
     allowed, although currently your window must be smaller than
     80 columns to scroll horizontally.

     The fonts available for display are the standard font, an
     italic font bold, greek, a small font, and a tiny font.
     There is additionally one user definable custom font
     available.  See wintext(4) for details.

     Graphics Windows

     A graphics window emulates a 4014 terminal.  However, two
     4100 series commands are available.  First, Set line style,
     <esc>MV d, where d is a digit from 0 to 7 allows setting the
     line style (or you can use the 4014 set line style command).
     Second, Set line index, <esc>ML d, where d is a digit from 0
     to 3 (and someday from 0 to 7) can be used to set the color
     of the line.  See wingraf(4) for details.

     Popup Windows

     A popup menu can be used in conjuction with the mouse for
     user input.  Details of this will be forth comming.  See
     winpop(4) for details.

     System Mouse

     A three key mouse is available for use in the display
     system.  In addition to the 3 buttons on the mouse, the
     system recognizes the keyboard meta and shift keys as
     modifiers to the mouse keys.  This provides 32
     distinguishable mouse inputs.

     Some of these inputs are captured by the system and used to
     control the pop-up menu that is used to manipulate windows.
     The ones that are caught  and the actions taken are
     programmable on a per-window basis.

     Key depressions that are not intrepreted by the display are
     sent to the host and translated to an escape sequence.  The
     byte stream is as follows:

     Mouse byte stream encoding
             Byte    Usage
             0       byte stream header, escape (\033)
             1       byte stream header, 'a' (\141)
             2       keydown code + 0x40
             3-6     Coordinates of cursor



2nd Edition                  Dr. Dum                 s Collection





WIN(4)              6130 Window Documentation              WIN(4)



             7       location
                     0x20 (space) not over a window
                     0x40+n       over window n
                     0x50+n       over window n in compressed window
             8-11    Coordinates of upper left corner of window
             12-15   Coordinates of lower right corner of window
             16-19   Window scroll offset
             20      break character (tp->t_brkc) set by stty if not nul.


     The keydown byte encodes which mouse buttons were not
     depressed.  The decoding is as follows:

             0x01    left mouse button
             0x02    middle mouse button
             0x04    right mouse button
             0x08    shift key depressed
             0x10    meta key depressed

     The number returned in this byte is the sum of the
     applicable codes for the depressed keys plus 0x40.  This
     assures that the resulting code is a printing character.
     For Example, the keydown byte is 0x5e if the left mouse
     button was depressed.

     Coordinates are encoded into 4 bytes.  Each byte contains 5
     bits of address in the lower 5 bits of the character.  The
     order and content is as follows:

             0x20+x  x is the upper 5 bits of the y coordinate
             0x60+x  x is the lower 5 bits of the y coordinate
             0x20+x  x is the upper 5 bits of the x coordinate
             0x40+x  x is the lower 5 bits of the x coordinate


     Keyboard

     There are 90 keys on the keyboard.  The keys labeled ctrl,
     meta, and two shift keys do not transmit any data to the
     system, leaving 86 keys which transmit codes when depressed.
     The 16 function keys across the top of the keyboard can be
     software redefined.  Each of these redefinitions cannot
     exceed 80 characters.  The function keys can be defined
     without computer involvement by holding down the meta key
     while typing the function key desired to be programmed,
     followed by up to 80 characters of text, and then depressing
     the function key again.

     There is a separate set of key definitions kept for each
     window.  Upon creation of a window the definitions are
     copied from a master set.  There is an escape sequence that
     enables one to switch to the master set and make



2nd Edition                  Dr. Dum                 s Collection





WIN(4)              6130 Window Documentation              WIN(4)



     alterations.  These would then effect any new windows that
     are created.  See winkey(4) for details.

     Line disciplines.

     The display system provides line disciplines for controlling
     communications as described in tty(4).

     Window Manipulation

     A number of ioctls exist to manipulate windows.  Each of
     these require a file descriptor of an existing open window
     as the first parameter.  A window can be created using the
     WIOCCREATE ioctl(2):

          ioctl(fildes, WIOCCREATE, &type)
          int type;

     The integer parameter type specifies the type of window to
     be created.  The file descriptor of the created window is
     returned in this variable as well.  When a window is
     created, it is hidden (not visible on the display),
     compressed and will expand to full size.

     The title bar of a window can be modified using the
     WIOCSTITLE ioctl(2):

          ioctl(fildes, WIOCTITLE, &title)
          struct title title;

     The title structure is defined in <sys/winioctl.h> as

             struct title {
                     int attrib;
                     int position; /* horizontal offset (pixels) into title */
                     int length;   /* length of string pointed to by text */
                     char *text;   /* text to write in title */
             };

     The attrib field is encoded as follows:

             0x0100  Set reverse video
             0x0800  Set underscore mode
     Color
             0x0000  Normal Color
             0x0200  Highlight 1 color
             0x0400  Highlight 2 color
     Font
             0x0000  Standard Font
             0x1000  Italic Font





2nd Edition                  Dr. Dum                 s Collection





WIN(4)              6130 Window Documentation              WIN(4)



     The location and size of the window is adjusted using the
     WIOCMOVE ioctl(2):

          ioctl(fildes, WIOCMOVE, &frame)
          struct frame frame;

     The frame structure is defined in <sys/winioctl.h> as

             struct frame {          /* frame of a window */
                     int y1;         /* coordinates of upper left corner */
                     int x1;
                     int y2;         /* coordinates of lower right corner */
                     int x2;
             };


     The coordinates in the WIOCMOVE ioctl are specified in
     pixels, however, the window will be framed to the next
     smallest character position.

     Currently the system maintains a full size virtual window
     for each text window.  If the window is currently framed to
     be smaller than full screen, the WIOCOFFSET ioctl(2) can be
     used to specify which portion of the window will be viewed.

          ioctl(fildes, WIOCOFFSET, &point)
          struct point point;

     The point structure is defined in <sys/winioctl.h> as

             struct point {
                     int x;
                     int y;
             };


     The coordinates in the WIOCOFFSET ioctl are specified in
     pixels, however, the value will be truncated to to the next
     smallest character position.  The point specified is the
     coordinates of the upper left corner of the portion  of data
     to be displayed.

     Multiple windows on the display can be viewed as being
     layered, one on top of another.  It is possible to take a
     window and move it to the top or the bottom of the stack of
     windows using the WIOCTOP and WIOCBURY ioctl(2);

          ioctl(fildes, WIOCTOP, 0)
          ioctl(fildes, WIOCBURY, 0)

     Windows can be compressed.  When a window is compressed it
     is no longer seen.  The name of the window is entered in the



2nd Edition                  Dr. Dum                 s Collection





WIN(4)              6130 Window Documentation              WIN(4)



     ``compressed'' window.  The compression and expansion back
     to where it was, is done with the

     WIOCCMPRS and WIOCEXPAND ioctl(2);

          ioctl(fildes, WIOCCMPRS, 0)
          ioctl(fildes, WIOCEXPAND, 0)

     When a window is expanded it is returned to the level and
     position it was at.

     The WIOCCOVER ioctl(2);

          ioctl(fildes, WIOCCOVER, &flag)
          int flag;

     Sets or clears the cover attribute on a window.  By default
     this attribute is set.  If this attribute is set when a
     window is brought to the top, any windows or partial windows
     have their colors switched to the background colors.  If the
     attribute is not set the colors remain unchanged.

     The WIOCNET ioctL(2);

          ioctl(fildes, WIOCNET, &fildes2)
          int fildes2;

     Adds the window to the net list.  Normally each window is
     independent of every other window.  If it is brought to the
     top all other windows are pushed down one level.  A set of
     windows can be grouped together if they are non-overlapping
     using the WIOCNET ioctl.  By default each window is in a
     list (net list) that contains only itself.  This ioctl adds
     the specified window (fildes) to the net list of the window
     specified by fildes2.  If fildes2 has the value -1, then
     fildes is removed from the net.

     The WIOCQUIET ioctl(2);

          ioctl(fildes, WIOCQUIET, &flag)
          int flag;

     Can be used to suppress system status messages when the
     window is moved or otherwise modified.

     The keyboard can be locked or unlocked using the WIOCENBL
     ioctl(2);

          ioctl(fildes, WIOCENBL, &flag)
          int flag;





2nd Edition                  Dr. Dum                 s Collection





WIN(4)              6130 Window Documentation              WIN(4)



     If the value of flag is 0 the keyboard is disabled, if the
     value is 1 it is re-enabled.  This can be used to disable
     keyboard input while loading up the user definable font or
     reprogramming keys.

     Finally the WIOCOP ioctl(2);

          ioctl(fildes, WIOCOP, &winop)
          struct winop winop;

     Can be used to send a generic message to the window manager.

     The winop structure is defined in <sys/winioctl.h>,

             struct winop {
                     int cmd;
                     int length;
                     char *data;
             };


     The set visibility command is an example of using this
     ioctl.  A window when created is `invisible' and when a
     WIOCTOP is done it becomes visible.  This command enables
     the user to make a window invisible, or visible as needed.
     An invisible window cannot be seen on the display.  This
     command is issued by the following actions:

     int flag;
         flag = 1;
         winop.cmd = 24;
         winop.length = 4;
         winop.data = &flag;
         ioctl(fildes,WIOCOP, &winop);

     If flag is 0, the window is made invisible, otherwise it is
     visible.

     This ioctl is also used for the the set palette command.  If
     cmd=8, length=32, and data points to an array of 32 unsigned
     characters issuing this ioctl will cause the  array to be
     used as the colors for the display.  The array can be
     thought of as if it were defined as unsigned char
     pal[1][3][3].  The lower 6 bits of each element of the color
     map designate a color.  There are 2 bits for each color,
     red, blue and green.  A given element of this array
     pal[a][b][c] can be interpreted as follows:

          a    0    Cursor Not present
               1    Cursor Present

          b    0    Not in window



2nd Edition                  Dr. Dum                 s Collection





WIN(4)              6130 Window Documentation              WIN(4)



               1    Active Window
               2    Non-Active Window
               3    Window Outline

          c    0    Background
               1    Character
               2    Highlighted Character (highlight1)
               3    Highlighted character (highlight2)


     For example, p[0][1][1] is the color to use for a character
     in the active window if the cursor is not on that pixel and
     p[1][1][1] would be the color when the cursor is on that
     pixel.  See wincolor(4) for more details on the colors
     available.

     Special Files

     There are two special files that can be used when you want
     to redirect the output of a program into a window.  They are
     /dev/tty7X and /dev/ttv7X.  When these devices are used the
     system will provide you with the next available window
     device.

     All devices of the form /dev/tty7? are references to text
     windows.  Devices of the form /dev/ttv7? reference graphic
     windows.

     The files /dev/dpa7, /dev/dmem7 and /dev/winstart are needed
     only for debugging purposes.  /dev/dmem7 is equivalent to
     /dev/kmem, except that it allows access to the memory space
     of the display.  /dev/dpa7 is used in conjunction with a
     special version of adb16, which treats this as if it were a
     serial port that makes possible window debugging.
     /dev/winstart is used to indicate to the unix kernel that
     the window system has been reinitialized by some sequence of
     commands through /dev/dpa7.


FILES
     /dev/tty7X

     /dev/ttv7X

     /dev/tty7[0-9,a-f]

     /dev/ttv7[0-9,a-f]

     /dev/console

     For debugging purposes




2nd Edition                  Dr. Dum                 s Collection





WIN(4)              6130 Window Documentation              WIN(4)



     /dev/dpa7                display adb port

     /dev/dmem7               display memory

     /dev/winstart            window driver kickstart device

CAVEATS
     Displays are not supported.  If you have a problem, report
     the problem through the same chain that you got your
     software from.  Please send updates for this document to
     athena!steved.

SEE ALSO
     csh(1csh), stty(1), tty(1), ioctl(2), sigvec(2), getty(8),
     wintext(4), wingraf(4), winpop(4), wincolor(4), init(8).








































2nd Edition                  Dr. Dum                 s Collection





































































%%index%%
na:72,82;
sy:154,205;
de:359,19276;
fi:19635,616;
ca:20251,255;
se:20506,430;
%%index%%000000000111

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