> # A Grail Millennium Project

> # White Paper

> History | Preface | TOC

> ##### This document is maintained by the author, Lewis A. Sellers, somewhere in the mountains of East Tennessee, the United States of America. It is an informal technical document for a works in progress project called Grail Millennium, or fully, The Minimal Operating System of Object Class Interfaces Holy Grail for the Millennium. In other words, for a new, easy to use, long-lived operating system.

> ## Copyright Notice

> ##### This document and all material therein, unless otherwise stated, is Copyright © 1995,1996, Lewis A. Sellers. All Rights Reserved. Permission to distribute this document, in part or full, via electronic means (emailed, posted or archived) or printed copy are granted providing that no charges are involved, reasonable attempt is made to use the most current version, and all credits and copyright notices are retained.

> ## Distribution Rights

> ##### All requests for other distribution rights, including incorporation in commercial products, such as books, magazine articles, CD-ROMs, and or computer programs should be made to the primary author Lewis Sellers.

> ## Warranty and disclaimer

> ##### This document is provided as is without any express or implied warranties. This is a work-in-progress, and as such will contain outdated or as yet uncorrected or substanstiated assumptions. The author, maintainer and/or contributors assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein.

> ## WWW Home Sites

> ##### You can currently find home sites to this project at
> - http://www.dwc.edu/grail/
> - http://www.usit.net/public/bcannon/grail/
> If you can not reach them, or they seem to be down, do a key word search on AltaVista, Lycos, or the Web Crawler search engines.

> ## Contact Email

> ##### The primary author of Grail Millennium should be reachable at lsellers@usit.net.

> Preface | TOC

> # OCI/Spec | M E T A P H O R

> ### DESIGNER

> Lewis A. Sellers (aka Minimalist) lsellers@usit.net

> ### ILLUSTRATIONS

> Except where noted, all illustrations, both rendered and drawn, are by myself using POVRAY, MIDNIGHT MODELLER, and bCAD (Russian software).

> ### DRAFTS

> - 2/16/96 Saturday, revision 0.00
> - 7/31/96 revision 0.01

> TOC

> # (a0.70)

> # Table of Contents

> Legal Notices | Who gets sued and why
> History | Changes and who made them
> Preface | About this document and the people that make it

> Overview | An Overview of the Visual Interface

> TOC

> # An Overview of The Metaphor

> BY | Lewis A. Sellers lsellers@usit.net

> TOC

> # TERMINAL1

> DESIGNER | Lewis A. Sellers lsellers@usit.net

> The very first metaphor ever to be coded will be TERMINAL1. It is quite unique among the others, for it is the only one that does not make use of the pure graphics capabilities of Grail objects. On the IBM x86 it runs entirely in 80x50 16/16 color mode. The logical size of the screen is actually 80x200 through memory scrolling.

> The point? You have to start somewhere. TERMINAL1 will be coded in TASM and then, through a converter program running in DOS, be transfered to the Grail root. In operation it is stark simplicity. I would in say, that in a sense it is like unto LYNX, in comparison to the other Metaphors to follow.

> By and large, TERMINAL1 completely ignores all graphic functions, emulating the requests for text windows as best it can.

> TOC

> # CLI

> DESIGNER | Lewis A. Sellers lsellers@usit.net

> The CLI (Command Line Interface) Metaphor, or a variant of it, will probably be metaphor of choice for programmers and developers. It's fairly straightforward, and fast with it's text renderings. As usual, the Command Interface is brought up from the keyboard by pressing CTRL-ESC and from the mouse by pressing all the buttons at once (center first, if it exists). By pressing TAB and SHIFT-TAB you can tab through all the open windows. The arrow keys will move you through the subwindows. ENTER activates the subwindow, if applicable.

> (illustration under construction)

> TOC

> # Glass

> DESIGNER | Lewis A. Sellers lsellers@usit.net

> GLASS is a nice, though fairly standard looking 2D windowed interface. It is composed of a background, several windows, subwindows for the main windows, and a command interface. As usual, the Command Interface is brought up from the keyboard by pressing CTRL-ESC and from the mouse by pressing all the buttons at once (center first, if it exists). By pressing TAB and SHIFT-TAB you can tab through all the open windows. The arrow keys will move you through the subwindows. ENTER activates the subwindow, if applicable.

> Click here for Picture

> [min: The above image is rough mockup of The Glass Metaphor. The renderings are by myself using Povray 2.2 and Bcad.]

> TOC

> # The Natural Landscape Metaphor

> DESIGNER | Lewis A. Sellers lsellers@usit.net

> Click here for Picture

> [min: The above image is the final original mockup of The Natural Landscape Metaphor I did when pitching the metaphor concept to the EOS Team. It is a simple composite of photos and illustrations. The Outer Ridge GOLD screenshot is used with permission of the author. The DOOM cyberdemon and Quake preview are courtesy of Id Software.]

> TOC

> # Terraphona

> DESIGNER | Lewis A. Sellers lsellers@usit.net

> The Visually Impaired

> I have from the beginning always wanted to have someone create a metaphor for the visually impaired. Something with some simple 3D visual landscaping effects similar to perhaps the Disney movie Tron but with a higher-readability. Mainly the environment however would consist of continuous sounds, digital and otherwise, that would be modified for their distance and other qualities. This metaphor would essentially be like a poorly lit room, rich with audio clues. The user would navigate almost entirely by sound. As you can see (or hear) I designed the Grail Metaphor abstractly enough that it becomes exceedingly easy to go this route, assuming you have a decent quality audio card. The monitor is secondary in priorities of course.

> The ideal setup would be a good audio-card, as stated, as well as a VR Headset sans video-display (stereo audio and head-tracking only) and a VR glove. Just as some objects would have custom icons they would have custom sounds. Your exact location and proximity could be gauged by background or environmental sounds... ie, if you were to modify the Natural Landscape Metaphor for the visually impaired, then perhaps as you drew near the trees (files) you would hear wind whistling through them, and leaves blowing, etc. Out in free filespace perhaps grasses or dust blowing, etc. When crossing boundaries or regions specific audio clues (clicks, beeps, whooshes, thuds) would be given to help gauge proximity and contact.

> It's not beyond the realm of possibility that IBM might help write speech recognition software objects to further empower our friends capable of speech. Or perhaps best, imagine software objects that recognize the movements of VR gloves and translates sign-language into the written word. =) This is a primarily game-driven operating system hot for VR technology, so the latter is an extremely real possibility, just as a side-effect if nothing else.

> You can figure out the rest yourself methinks.

> TOC

> # The Metaphor Class Object

> DESIGNER | Lewis A. Sellers lsellers@usit.net

> It is true that the metaphor is not constrained to use a set class GUI. Nevertheless, if there were not some basic framework in place to implement an interface to the operating system Policy / Navigation File and global kernel functions then chaos would reign between applications. To the left is an example of a Command Interface overlaying someones 3D metaphor system. (Ok, it's my Natural Metaphor.)

> All __METAPHOR objects, no matter who has written them, must support all of the following functions. You may of course have other, better, more useful functions in your metaphor, but the following are required for metaphors so that all objects written by anyone can do the primative desktop operations.

> There are two sets of public metaphor functions, those that control the command interface and those than manage the viewports. Metaphor viewports are ....

> [ideal screen]

> wall

> window

> region

> Does house keeping making sure all window values are valid and all windows have a valid parent object

> Orientation and Position

> The values used are signed integers for position and signed fixed-point for orientation. By default, orientation uses the whole numbers 0 to 255 to represent a full rotation (ie, a "360" is 256).

> METAPHOR.COMMANDINTERFACE_Show

> Forces the Operating System Command Interface to come up. An example of a command interface is seen in the illustration above. It allows access to the highest level controls, allowing the user to start, stop, suspend programs, shut down or reboot the system, change into another user (profile) or possible edit or redefine how the system hardware, resources, profiles are setup. They also usually allow a heirarchial traversal of applications.

> Both the Glass and Natural Metaphors use the CTRL-ESC key sequence to call up the control interface.

> METAPHOR.COMMANDINTERFACE_Hide

> Hides the metaphors command interface.... assuming the command interface doesn't mind being hidden.

> METAPHOR.WindowOpen

> This function creates and opens a window. The function returns the window reference number.

> METAPHOR.WindowClose window

> METAPHOR.WindowMove window, x, y, z

> Changes the origin point of the specified window.

> METAPHOR.WindowRotate window, roll, pitch, yawn

> METAPHOR.WindowSize window, width, height, depth

> Resizes the specified window. Originally regions were to be setup by one function that accessed one data stream that had the entire specifictions for all the regions in a window. Though this was simpler, you lost the parameter_list ability as well as a few other things, so standard add, change, delete functions were used as well as this one that sets up the windows header.

> METAPHOR.AddRegion window, ptr_stream

> This defines how the window is to appear. By default, after a window is created/opened it is dimensionless and invisible. Through this function you can pass a pointer to a structure that will define with height, width and depth of the window as well as define active sub-regions within it.

> `STRUCT`

> `d.32 type`

> `d.32 width, height, depth`

> `d.32 x, y, z ;relative`

> `d.32 roll, pitch, yawn`

> `ptr src_ptr`

> `ENDS`

> METAPHOR.ChangeRegion window, ptr_stream

> METAPHOR_DeleteRegion window, region

> When a region is deleted out of a list it does not change the numbers of any other regions in that window. As to whether the region is actually deleted from memory or just tagged deleted is up to the metaphor.

> METAPHOR.GetRegion_Requirements

> METAPHOR.GetRegion

> METAPHOR.Region window, region, operation, value

> Modifies a window region.

> clear

> scroll *

> lock

> unlock

> update_value

> retrieve_value

> METAPHOR.WidowISOCharset window, charset

> Defines the charset a window...

> METAPHOR.POV x, y, z, roll, pitch, yawn

> Changes the users point of view in relation to all the windows. :) May or may not actually do anything, depending on the Metaphor. In Glass, the function is essentially ignored, but in the Natural Metaphor you can move around to any point in cyberspace. Such movement is handled internally in the Natural Metaphor as well however, so there's not that much need to use this.

> METAPHOR.Color color_struct

> `STRUCT color_struct`

> `;background`

> `color_bitdepth`

> `red`

> `green`

> `blue`

> `alpha`

> `table`

> `ENDS`

> If alpha=0, transparent.

> METAPHOR.Handler handler

> METAPHOR.Suspend window

> Reduces a running process to a background task, which is visible only as a static(?) icon.

> METAPHOR.Wake window

> Gives an application ..

> METAPHOR.Show window

> METAPHOR.Hide window

> METAPHOR.Morph window, state

> A window holds three sets of master coordinates that you can morph to at will. They are called background, monitor, and fully_active. The first, background is a very small icon that merely shows the process exists......

> ****************

> type:

> text

> graphic

> video

> control

> Text

> Unchanging text-only area (or seldomly changing).

> Graphic

> Video

> This area is where the VIDEO out of MPEG cards or software is sent to.

> Control (Graphic)

> **

> static (locked)

> dynamic

> ** 6, 10...

> Faces:

> all

> center

> top

> bottom

> left

> right

> topleft

> topright

> bottomleft

> bottomright

> **

> x

> *

> y

> *

> z

> **

> Action:

> Stop

> Pause

> Next

> Previous

> Page

> Pageup

> Title

> Open

> Close

> Closes the window and all associated child windows.

> Minimal Screen

> Shrinks a window down to it icon but continues to run.

> Normal Screen

> Full Screen

> Opens a window up to be viewed.

> Resize

> Move

> XScrollBar min, max, default

> YScrollBar min, max, default

> ZScrollBar min, max, default

> XScrollPositive

> YScrollPositive

> ZScrollPositive

> XScrollNegative

> YScrollNegative

> ZScrollNegative

> Refresh

> Backward

> Foreward

> Load

> Save

> Edit

> Button

> Sets the value to TRUE (1).

> Toggle default

> Toggles the value there back and forth between 0 (FALSE) and 1 (TRUE).

> ****

> MenuHorz

> MenuVert

> List

> ListFont

> ListFontSize

> ListLink

> ListFiles

> ListDevices

> TOC

> # Console Text-only Functions

> DESIGNER | Lewis A. Sellers lsellers@usit.net

> The required set of functions, as previously stated, can be quite powerful, but they can require a little work to setup for presentation. The higher-level text set of functions allow quick straight-forward display of information without bothering with setting windows up. The functions actually call the lower-levels ones available here to do automatic windows setup and handling for.

> You should be aware that because of the design of metaphors the output may be a 2d window, or it could be onto a morphed 3d object or the output could even be only spoken aloud for the visually impaired.

> If the metaphor is highly audible, then a defined set of sounds should be used for each operation with an asterisk. The newline sound is an extended pause.

> These functions support both the ISO-8859-n (8bit) and ISO-10446 UNICODE (16bit) character sets.

> ISO 8859

> 8859-1 Europe, Latin America

> 8859-2 Eastern Europe

> 8859-3 SE Europe

> 8859-4 Scandinavia (mostly covered by 8859-1 also)

> 8859-5 Cyrillic

> 8859-6 Arabic

> 8859-7 Greek

> 8859-8 Hebrew

> METAPHOR.TextOpen

> Creates a simple text-only window and returns a pointer to it's windows structure in the backbone. Also add the pointer to the metaphor's internal window list and creates the window. Note that by default windows are hidden (ie, suspended). You must unhide them before you can use them.

> This automatically clears the window and sets to the default colors (which are black on white for the Glass Metaphor).

> METAPHOR.TextClose windowhandle

> Removes the window from the backbone and the metaphor's internal list. Supposedly the metaphor will clean up after the window closes as well.

> METAPHOR.TextUnhide windowhandle

> METAPHOR.TextHide windowhandle

> METAPHOR.TextSettings windowhandle, op, arg1, arg2

> Two operations:

> 1 Set width/height

> arguments are Width, Height in pixels

> 2 Set relative x,y position from origin.

> arguments are x, y in pixels

> METAPHOR.TextClear

> METAPHOR.TextScroll direction, amount

> Scrolls the text area. If amount is 0 then it will scroll a page worth. If it is 1, it scrolls one character worth.

> direction

> up

> down

> left

> right

> upleft

> upright

> downleft

> downright

> METAPHOR.TextMoveCursor op

> up line

> down line

> foreward

> backspace

> METAPHOR.TextAppearance op, var

> font_size n

> font_style n

> normal

> non/italics

> non/bold

> non/underline

> non/overstrike

> font_color color

> background_color color

> font_spacing fixed/variable

> ISO char-set

> Font styles available are stock, technical, high-readability and well-formed.

> Colors are: black, dark-gray, gray, light-gray, white, red, green, blue, brown, orange, purple, cyan, magenta

> ISO: 8859-1, 8859-2, 8859-3, 8859-4, 8859-5, 8859-6 and 10646

> METAPHOR.TextInfo

> width, height

> fixed/variable

> font_color

> background_color

> locked?

> METAPHOR.TextRestorePosition pos

> For various reasons this function does not allow you to specify exact x,y coordinates directly. You can ask where the cursor is currently at and the coordinates will be returned to you as a single variable indicatating that location on screen. [For the curious, the passed variable is currently the x and y word coordinates in dword format for the Natural and Glass Metaphors. This may vary with other people Metaphors.]

> METAPHOR.TextStorePosition

> This allows you to change the current cursor position to any that you have previously saved. Note that if the text window scrolls the coordinates may not be placed where you'd like them. If you are trying to create a data entry screen you should use the lock operation to stop the screen from scrolling around.

> METAPHOR.TextEdit op, var

> newline

> tab n

> destructive back

> un/lock

> delete line

> insert line

> METAPHOR.TextPrint ptr_string

> A simple print NULL-terminated string function.

> METAPHOR.TextPrintVars ptr_args_string

> This does not claim to be the end-all, be-all when it comes to printing text to the screen. This function is part of the required _textwindow set that is to be used for nearly effortless printing to a text-only window. Build your own custom objects for more flexibility and power. Normally I'd hate having such a non-abstracted function in these documents, but __METAPHOR is fairly high level and this is for a very much needed purpose.

> This prints NULL-terminated strings to a text-only window. This function is required to recognize "\n" as newline and "\t" for tab. The string is either in ISO-Latin-1 ASCII and UNICODE. Unicode is the default.

> This function operates on a series of pointers that is NULL terminated. The pointers are to either strings or binary number of some kind. How do you tell which is which? The pointers are prefixed by a control sem (a native sized word). The sem specifies what the pointers is to and how it should be formatted.

> `STRUCT`

> `dbit.32`

> `3 type`

> `1 separator`

> `2 alignment`

> `2 padding`

> `8 bitwidth`

> `16 place_precision`

> `dbit end`

> `STRUCT END`

> Type is one of:

> 0 string

> 1 integer

> 2 fixed point

> 3 floating

> Alignment:

> 0 left

> 1 right

> 2 center

> Padding:

> How to fill up the empty spaces?

> 0 blank

> 1 zero

> 2 other

> Separator:

> A boolean flag to determine separator use. In America every three places you use a comma. Most everywhere else everythree places it is a period.

> BitWidth

> The size of the data element. For ISO Latin-1 etc this is 8. For Unicode this is 16. For all other elements this is just their bitsize. A dword is 32 for instance.

> Place_Precision

> All of this works because this is how Grail Script parses strings of parameters it encounters. For example:

> int n

> Print = __OBJECT.Function __METAPHOR, TextWindow_Print

> n=7

> Print "The number ", n, "is whole?\n"

> Here Script creates an arg stream composed of a string, a 32-bit integer, an another string. The Print one the last line is passed a pointer to this arg stream, upon which it operates.