Applications and Geodes: 1.1 Geodes: Geode Components and Structures

Up: GEOS SDK TechDocs | Up | Prev: 1 Geodes | Next: 1.2 Launching an Application

A geode is simply a special type of GEOS file. It has a special file header that gets loaded in as the geode's core block. This file header contains the geode's type, attributes, release and protocol levels, and many other pieces of information necessary for GEOS to work with the geode. You never will have to know the exact structure of this header as the kernel provides routines necessary to access important portions of it.

Several important items contained in the header are listed below.

Geode Attributes

Each geode has in its core block a record of type GeodeAttrs . This record defines several things about the geode, including which aspects it uses and which of its aspects have been initialized. The GeodeAttrs record contains one bit for each of the following attributes.

GA_PROCESS
This geode has a process aspect and therefore an initial event-driven thread.
GA_LIBRARY
This geode has a library aspect and therefore exports routines (and possibly object classes).
GA_DRIVER
This geode has a driver aspect and therefore has a driver table, in which the strategy routine is specified.
GA_KEEP_FILE_OPEN
This geode must have its .GEO file kept open because its resources may be discardable or are initially discarded.
GA_SYSTEM
This geode is a privileged geode and is almost certainly a system-used driver. These geodes have special exit requirements.
GA_MULTI_LAUNCHABLE
This geode may be loaded more than once and therefore may have more than one instance of its core block in memory.
GA_APPLICATION
This geode is a user-launchable application.
GA_DRIVER_INITIALIZED
This flag is set if the geode has had its driver aspect initialized (if the driver's strategy routine has been initialized). This flag will be set dynamically by the kernel.
GA_LIBRARY_INITIALIZED
This flag is set if the geode has had its library aspect initialized (if the library's entry routine has been called). This flag will be set dynamically by the kernel.
GA_GEODE_INITIALIZED
This flag is set if all aspects of the geode have been initialized.
GA_USES_COPROC
This geode uses a math coprocessor if one is available.
GA_REQUIRES_COPROC
This geode requires the presence of a math coprocessor or a coprocessor emulator.
GA_HAS_GENERAL_CONSUMER_MODE
This geode may be run in the General Consumer (appliance) Mode.
GA_ENTRY_POINTS_IN_C
This geode has its library entry routine in C rather than assembly language.

Geode Token

As stated above, every geode is associated with a token in the token database. This token is defined by the use of a GeodeToken structure. This structure and its uses are discussed in Creating Icons .


Up: GEOS SDK TechDocs | Up | Prev: 1 Geodes | Next: 1.2 Launching an Application