
                             GEM DESKTOP 3.02 GPL

				 July 4, 1999
                    --------------------------------------
		       Restored Portions & documentation
			     (except where noted)
                    (C)1999 Ken Mauro, all rights reserved.

                                Contributors
                                -------------
                                 Gene Buckle
                                 Tim Olmstead
				Ben AL Jemmett

                         Original GEM Desktop Sources
                         (C)1987 Digital Research Inc.
                    (C)1999 Caldera Thin Clients Inc. (GPL)

                        Original and Restored Portions
                          free for non-commercial use.
                       (see GPL license.txt for details)




Introduction
------------
Knowledge of GEM, the desktop, programming and required tools are assumed.
Be sure to backup all current desktop related files before proceeding.

Sources affected are commented and marked by using keywords: '-ken' or 'BALJ'


Features
--------
This desktop is a restored build with most cut-out features re-enabled:)
infoline, icon drag, overlapping, adjustable windows w/context save.

Rewriting the disk icons back on to the desktop would have been preferred
but a little too difficult at this time, given the lack of documentation
(and my experience;)


Possibilities
-------------
While the desktop can support more than four windows, keep in mind the stock
GEM AES can still only handle seven open handles +the desktop (eight total).
     (BTW - this also includes any -active- desk accessories)

If this is a problem, it could be alleviated either by
     a. re-compiling the desktop for less than four windows. ( easy )
     b. continuing the rewrite to restore those features ( not so easy )
     c. rewriting the AES for more support. ( not so easy )
     d. waiting for someone else to do it. ( preferred :)


The Desktop routine that executes output.app (off of the file menu) could
be adapted to the shortcut metaphor. GEM shell command strings in text files.

Hopefully, this will provide a handy start for those wishing to further
improve or enhance the orginal scope of the GEM/3 desktop.



-Ken Mauro 7/04/99





Installation and setup
----------------------
Be sure to backup or rename all of your current desktop files before using.
(desktop.app, desktop.rsc, desktop.inf, deskhi.icn, desklo.icn etc.)

Since the current GEM/3 desktop does not allow the user to open new windows,
You must use a desktop.inf which previously had all four windows saved.
(such as the one supplied, or a copy of the one supplied with desktop 1.2)

Improved assemble/compile/link batchfile that now supports minimal dos
errorlevel style trapping, with error log files for HI-C, RASM86 and LINK86.
Most errors should kick you out of the batch file as they occur.

You would then view the HC.LOG, RASM86.LOG or LINK86.LOG as required.

This package should be compiled from its own subdir or ramdisk (preferred).

Warning: previously compiled (*.obj) and error (*.log) files are erased at the
start of each build. If not desired, comment out the batch file as required.


minor problems;)
----------------
When icons are fully moved to the left, there may be some empty space in the
window depending on how it is horizontally sized.

While dragging a file onto a 'disk drives:' window, selecting an icon and then
moving off again before releasing the mouse button; will trigger an AES alert
(from gem.rsc) impling that your application could not open a file or folder.
The desktop code did not catch the error. (non-fatal, just press [ok] )

Windows positioned too close to the menubar, may snap up after save/restore.



Desktop Tool Notes
------------------

File :  High-C 1.4 (598k bytes, early 1987) Serial# 112
Prob :  DOS command line problems after compiling the C language portions.
	Also may lockup after compiling several modules under batch file.
        after the dos prompt returns, using dos's DEL command with a wildcard
        specification (*.obj) produces an error: 'too many parameters - obj'.
Fix? :  Increasing the dos stack to: STACKS 9,512 cured the problem for me*

Note :  High-C 1.4 (642k bytes, late 1987) Serial #113
        This version does not seem to exhibit any of the above problems
        and may have been a maintenance release as the version is the same.
	It also identifies itself as supporting i80386 code.


File :  Link86
Prob :	Intermittant EMM386 #12 (stack) errors using Link86 2.02 
Fix? :	Increasing the dos stack to: STACKS 9,512  (worked for me*)

*Note:  It is not clear if the above problems are caused by some interaction
        between my machine, HI-C, LINK86, RASM86, RAMDRIVE or EMM386.



Desktop Source Changes
----------------------

File : 	DESKSTAR.A86
Code : 	GLOBAMNT increased from 7D1Ch to 8f00*
why? : 	increased space for previously reduced/removed window resources.
	SIZE_AFILE (deskapp.h) must also be raised to accomodate GLOBAMNT
        or else desktop.app will crash during initialization.

	*Note: minimum acceptable amount for 4 windows, if more global
	       space is required, raise GLOBAMNT and SIZE_AFILE (deskapp.h)
	       SIZE_AFILE must be at least 256 bytes greater than GLOBAMNT
	       otherwise you may lockup during init or when returning to
	       the dos prompt, you may get: 'cannot load command.com'.


File :  GEMBIND.C
Code :  form_do() - inserted a call to: evnt_timer() (150ms delay)
Why? :  Some machines (possibly speed related) may have intermittant lockup or
        initial lack of control after a dialog is drawn and form_do is entered.
	I have also seen this problem with desktop 1.2 on several 486 machines.

        1. cursor may not respond to key unless mouse is clicked first.
        2. with more than 2 windows and accessories active; the 'about' dialog
           does not respond to the mouse although the pointer is still alive.
           the only solution is to reboot.

Note:	I have noticed in the desktop sources, that other calls to evnt_timer()
        and wind_get() are commented out at various points, suggesting the
        developers might have been aware of some type of interrupt or dispatch
        timimg problems. See GEMBUGS.DOC (included)


File :  DESKAPP.H
Code :  WSAVE, SIZE_AFILE def from 2048 to 3072 (paragraphs)
Why? :  WSAVE win_save[2] changed to win_save[4]
	SIZE_AFILE related to the size of desktop.app (code seg ? -ken)
        should be large enough to accomodate GLOBAMNT in deskstar.a86
	win_save sets number of windows saved in desktop.inf by cnx_save()


File :  DESKAPP.C
Code :  changed rdicon()
Why? :  changed the index & portion of the icon used to highlite or select it.
	now uses ib_pmask instead of ib_pdata (also a change in deskact.c)


File :  DESKHI.ICN
Code :  restored trashcan ( for GEM desktop 1.2  w/ GEM 3.x only)
Why? :  A clean desktop is a happy desktop.
        the desklo.icn has not been updated at this time.

Note:	deskhi & desklo.icn are now interchangeable with GEM desktop 1.2


File :  DESKWIN.H
Code :  w_sinfo(), win_alloc(), NUM_WNODES raised from 2 to 4.
Why? :  restore infoline support for desktop windows.
	w_sinfo() called in win_alloc() had to be re-written, it was missing.
	restored WNODE w_info[81] field in DESKWIN.H (81 bytes per WNODE).
	changing win_set's WA_TATTRB corrected WF_TOP and redraw problems.


File :  DESKFUN.C
Code :  win_sinfo and wind_set() calls uncommented.
Why? :  re-enable desktop window infoline (WF_INFO) call.


File :  DESKSUPP.C
Code :  win_sinfo, wind_set()
Why? :  implement desk window infoline (WF_INFO) feature.
        this point was chosen because the title (WF_NAME) is set here.


File :  DESKSUPP.C
Code :  do_wfull()
Why? :  re-written to properly resize overlapping windows.
        previously, this routine only supported partial resize
        of two fixed position windows (upper and lower).


File :  DESKACT.C
Code :  gsx_attr(), rc_constrain(), gr_drgplns()
Why? :  restore icon outline drag for original file copy metaphor.
        add AT_ISFILE type to provide additional feedback while dragging.
        previously only disk and folder icons highlite while dragging.


File :  DESKACT.C
Code :  act_chg(), act_allchg(), do_chg()
Why? :  Adjust do_chg()'s ob_state select values to restore the original
        (inverted) metaphor for selected window objects. ( GEM desktop 1.2 )


File :  DESKTOP.C
Code :  sound(), do_movesiz(), win_hblt(), win_hslide(), do_copywrt()
Why? :  restored easter egg, horiz slide features.
        minor size adjustment to copyright dialog during startup splash.
        full desk window move, resize, horiz and vert scroll restored.


File :	DESKTOP.C
code :	rc_copy(), cnx_put() changed, fix_wins() removed.
Why? :  fix desktop save/restore context for multiple windows.
        fixwins() method of identifing saved windows (topped/fulled)
	by location and position is no longer suitable for overlapping windows.


File :	DESKTOP.C
code :	obid_save, gl_idsiztop & gl_whsiztop redefined.
Why? :  save/restore currently topped window & context between desktop runs.
        obid_save was previously hardwired to zero and appears to do nothing.
	obid_save is reset back to zero after use - just in case.

        gl_idsiztop, a global word previously used by fixwins() is no longer
        required by a multi window system and is used for top window restore.


*The End.
