Programming guideline of WinDom
Windom is a tool for GEM programming. It allows you to easily handle
windows and many other GEM features. This version is now available
for Pure C, Sozobon C and Gnu C compiler (with 32 bits int size).
WinDom works with all TOS compatible systems (all TOS Atari version,
Milan TOS, MiNT, MagiC, MagicMac, MultiTOS, Naes and probably most of
PC TOS emulator).
WinDom has two kinds of functions: a new set of GEM functions
replacing native GEM functions and other functions realizing complex
GEM operations.
Actually, the new GEM functions are very similar to their GEM homolog
functions but their actions are extended. For example, using WinDom,
we never call appl_init() but the new function ApplInit(). Thus,
WinDom programming looks like GEM programming. Some WinDom functions
are incompatible with GEM functions but not necessary. The table AES
versus Windom in annex lists differences and compatibility between
Windom functions and GEM functions.
The concept of WinDom is very simple: each window have a descriptor
(a pointer on a C struct). This descriptor contains a set of
functions attached to GEM events. The main function of WinDom (the
EvntWindom() function) replaces the GEM function evnt_multi(): it
intercepts GEM events and execute the right function attached to
them. By default, new windows have a set of standard event functions
already defined. Then, in most cases, only a small number of event
functions has to be written.
Here, a non exhaustiv list of the main features of WinDom:
- Windom tries to unify all AES versions: all Windom
functions are available with any AES. When a function uses a
special feature (like window iconification) not available on old
versions of AES, the feature is emulated.
- Windom has a set of new objects compatible with the famous
MyDials library. These objects have a 3D-style available for all
TOS, even in monochrom.
- Windom can divide a window in several subwindows (called
frames). Each frame is handled like a standard window.
- A function can be attached to an AES message event: when
EvntWindom() intercepts this message, the function is executed.
The documentation of Windom is organized as follow: a first part is
devoted to a tutorial: each component of WinDom is visited with C
code examples, a second part lists all Windom functions grouped by
theme. The folder \EXAMPLE of the Windom distribution containts some
examples of WinDom programming.