•  Back 
  •  AES 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help page 
  •  Show info about hypertext 
  •  View a new file 
Topic       : TOS - The Operating System
Author      : 
Version     : tos.hyp (December 19, 2008)
Subject     : Programmieren/Atari
Nodes       : 3010
Index Size  : 93790
HCP-Version : 5
Compiled on : Atari
@charset    : atarist
@lang       : 
@default    : Title
@help       : 
@options    : +g -i -s +x +zz -t4
@width      : 70
View Ref-File8.2  AES fundamentals                                              TOS

The AES (Application Environment Services forms the highest level of 
GEM. It deals with all those parts of GEM that go above elementary 
graphic output and input functions. As the AES works exclusively with 
VDI and GEMDOS calls, it is completely independent of the graphic 
hardware, of input devices as well as of file-systems.

The AES manages two types of user programs: Normal GEM applications 
with file extensions '.PRG', '.APP' or '.GTP', and desk accessories 
with file extensions '.ACC'.

Unless you are using a multitasking operating system such as MagiC, 
MiNT or MultiTOS, the AES can only run one application and six desk 
accessories at a time. Desk accessories (with an '.ACC' extension) 
allow quasi-multitasking even with plain TOS: They are usually special 
GEM programs loaded (wholly or partially) at boot-up from the root 
directory of the boot drive (normally C:\), which remain in memory and 
can be called at any time from GEM (and some TOS) programs by clicking 
on their entry in the first drop/pulldown menu. In other words, desk 
accessories can be called and used while another application is 
running and has its window(s) open, even with a single-tasking 
operating system such as TOS. Note that this is not real multi- 
tasking, as the main application is suspended while the accessory is 
executing and only resumes when the accessory is exited.

Unlike applications, desk accessories don't interact with the user 
immediately; most just initialize themselves and enter a message loop 
awaiting an AC_OPEN message. Some wait for timer events or special 
messages from other applications. Once triggered, they usually open a 
window where a user may interact with them. Under TOS, accessories 
should not use a menu bar and should never exit after a menu_register 
call. Loading of any resources should happen before the accessory 
calls menu_register, and these resources should be embedded in the 
desk accessory rather than being post-loaded, as on TOS versions 
earlier than 2.06 memory allocated to a desk accessory is not freed at 
a resolution change; thus memory allocated with rsrc_load is lost to 
the system after a change of resolution with the early TOS's.

When a desk accessory is closed under TOS, it is sent an AC_CLOSE 
message by the system. Following this it should perform any required 
cleanups to release sytem resources and close files opened at AC_OPEN 
(the AES closes the accessory's windows automatically). Following this 
it should reenter the event loop and wait for a later AC_OPEN message.

The following points are covered in this section:

   . Accessories in MagiC
   . Bindings of the AES
   . The desktop window
   . Data exchange via the GEM clipboard
   . Messages
   . AES object structure
   . Quarter-screen buffer
   . Rectangle-list of a window
   . Screen-manager
   . Startup-code for accessories
   . Toolbar support

For the AES too there have been some interesting developments, as 
various programmers have meanwhile announced their own AES clones; at 
present one can mention projects such as N.AES and XaAES. Besides 
constant evolution one may hope also for source texts of these GEM 
components.

See Also: Style guidelines