ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version

# System Internals in Common Graphics

This document contains the following sections:

1.0 The *system* variable
2.0 System configuration
3.0 The app slot
4.0 System start up and shut down
5.0 dumplisp

## 1.0 The *system* variable

The goal for Common Graphics and the Development Environment is to have a single global variable called `*system*`. The value of this global variable is an instance of the `devel::development-system` class when you are running the IDE, and an instance of the `system` class in a delivered application.

All slots and other global information, are added as properties of `*system*`. That way, you can assess and change anything about the global state using the inspector.

## 2.0 System configuration

An instance of the `system` class is a hierarchical object. Stored in a slot of a `system` instance is a `configuration` object, which is used to store all options that will be saved and restored in the preferences file (allegro-ide-options.cl). Not all configuration options are displayed in the Options dialog (displayed by choosing Options from the Tools menu) but the commonly used ones do.

Like the `system` and `devel::development-system` classes, there are `configuration` and `devel::development-configuration` classes. The `configuration` class is used for Common Graphics and some Common Lisp configuration options. The `devel::development-configuration` is used for the Development Environment configuration options.

All slots and configuration information should also be properties of the `configuration` class so that you can assess and change them using the inspector. Only properties are saved to the preferences file allegro-ide-options.cl.

## 3.0 The app slot

The app slot of the system object holds an instance of the `app` class. An app object holds Windows application information such as current program, command line options, `hinst`, `wndow-proc-address`, etc. This object is analogous to the app object offered by Visual Basic.

## 4.0 System start up and shut down

To start Common Graphics or the Development Environment, run the function start-ide. System start up is described in About IDE startup in cgide.htm.

Exiting the system in the development environment only -- i.e when running the IDE -- each item in `(exit-tests *system*)`, which is a list of functions (see exit-tests), is funcalled. The exit is aborted if any of the functions returns false.

## 5.0 dumplisp

After a dumplisp, the `*system*` variable remains bound. That way, the global state and the configuration are saved in the new dxl. When the system is started after a dumplisp, cg::reinitialize-system is called to clean up the values stored in `*system*`.

Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version