- CHAPTER 9 -
The 'Desktop' is a GEM application that is started after
the operating system is initialized and all '\AUTO' folder programs
and desk accessories are loaded. The desktop is responsible for
providing basic file management and program launching abilities
to the user.
Normally, the desktop is contained in ROM, however under MultiTOS,
the desktop may be soft-loaded by placing the following command
line inside the 'GEM.CNF' file:
If the 'shell' command fails, the normal desktop is started.
If an installed shell program exits under MultiTOS, the
OS will display a single menu from which programs may be launched.
The desktop may be sent messages using the AES's shel_write()
command. The desktop currently recognizes two special messages
as follows:
DESKTOP
Overview
MultiTOS Considerations
Messages
Message |
| Meaning |
---|---|---|
SH_WDRAW |
| This message tells the desktop that files on a particular drive have been modified so it can update the information in any open windows.msg[3] should contain the drive number ( 0 = A:, 1 = B:, etc.). A value of -1 will force the desktop to update all of its open windows. |
AP_DRAGDROP |
| The desktop included with AES 4.1 now accepts all drag & drop messages and places the dropped object on the desktop. |
| Meaning |
---|---|
| Confirm file copies. |
| Do not confirm file copies. |
| Confirm file deletes. |
| Do not confirm file deletes. |
| Confirm file overwrites. |
| Do not confirm file overwrites. |
| Prompt to rename destination file(s). |
An application which is installed to replace disk operations will receive one of two command lines as follows:
1. Format a drive (ex: A:): -f A:
2. Copy a disk (ex: A: to B:): -c
A: B:
When the user uses the desktop to launch a .TOS or .TTP application
under MultiTOS, the desktop looks for an environment variable
called TOSRUN. If it finds one, it attempts to launch whatever
application is specified in that variable with the TOS filename
as its parameters.
If the environment variable does not exist, it opens a pipe called
'U:\PIPE\TOSRUN' and writes to it the filename and any parameters
separated by spaces terminated by a NULL byte.
The desktop in TOS versions less than 2.00 place configuration
defaults such as window size and position, drive icons, etc. in
the DESKTOP.INF file. In addition, some control panel settings
(from CONTROL.ACC, not XCONTROL.ACC) are stored in the file as
well.
The DESKTOP.INF file is in standard ASCII text format. This file
was not designed to be edited by the user or programmer, but,
rather from the desktop itself and will not be discussed in detail.
As of TOS 2.00, the desktop now looks for a file called
NEWDESK.INF rather than DESKTOP.INF. This file contains the same
information as its predecessor with some additions. Icons which
appear on the desktop or in windows may now be linked to icons
in the DESKICON.RSC file (as described below). Other entries are
still reserved and should be left unmodified.
A creative install program wishing to install custom icons may
do so by adding the icons to the DESKICON.RSC file and adding
information to NEWDESK.INF which points to the new icons. The
install application must be careful to avoid disturbing the original
information and icons and must not reorder the icons in the DESKICON.RSC
file. The following two lines show example entries in NEWDESK.INF
that identify an icon for a file and folder respectively.
The '#I' identifies a file icon and the '#D' identifies a folder
icon. The next two numbers should be identical hexadecimal indexes
to the icon in the DESKICON.RSC file. The entry '000' is unused
and should be included only as a placeholder.
The filename specified on the line can contain wildcard characters
and identify the file or folder name(s) which are to be linked.
All spaces and '@' characters must appear exactly as above or
the system may behave strangely.
The DESKICON.RSC file is a standard GEM resource file (see
Appendix C: Native File Formats) with one object
tree containing a BOX object at the ROOT (object
#0) with the icons as children. The position of the icons in the
object tree determine their index as referenced by the NEWDESK.INF
file.
This file is supported as of TOS 4.0 and is looked for
before DESKICON.RSC. It has an identical format except that it
supports the new resource file format and contains color icons
rather than monochrome ones.
TOS Application Launching
Desktop Files
DESKTOP.INF
NEWDESK.INF
#I 2C 2C 000 @ *.TXT@ @
#D 1A 1A 000 @ FOLDER@ @
DESKICON.RSC
DESKCICN.RSC