| Allegro CL version 8.2 Unrevised from 8.1 to 8.2. 8.1 version |
Arguments:
Initializes Common Graphics. This function needs to be called before any other Common Graphics functions are called. This is done automatically by the IDE, and by any standalone application that was created from an IDE project with the File | Build Project Distribution or File | Build Project Exe commands (unless the project does not use the default on-restart function, which is not normally changed). You should need to call initialize-cg only in a Lisp that does not have the IDE running (see ide:start-ide) or in a standalone application that was created with a direct call to generate-application.
If Common Graphics is already initialized, initialize-cg simply returns the
process that initialized it. Otherwise it attempts to initialize
Common Graphics, and returns t
if this was
successful and nil
if not. The value of
*cg-is-initialized*
indicates
whether Common Graphics is currently initialized.
initialize-cg
needs to be called only a single time even when multiple Common
Graphics processes are used. The only processes that may use Common
Graphics functionality are the ones that called initialize-cg plus any other
processes that are created later by passing *default-cg-bindings*
as the
initial-bindings keyword argument to process-run-function (see About using multiple
windowing threads in a Common Graphics application in
cgide.htm). In either case, the process typically
will then create one or more windows (see make-window) and other Common
Graphics objects and then call event-loop to handle events. The
macro in-cg-process may be used to handle
the process creation and calling of event-loop for a body of Common
Graphics code.
When loading individual Common Graphics modules into a development lisp where the IDE is not loaded, all modules that are to be used should be loaded before calling initialize-cg. If additional modules need to be loaded later, first call exit-cg, then load the modules, and then call initialize-cg again.
Common Graphics may be loaded in its entirety into a base lisp by
simply evaluating (require :cg)
. To instead load a
subset of the many Common Graphics modules, you could require or load any of the modules in Allegro's
code/ subdirectory that begin with cg-.
Each Common Graphics module will automatically load other modules on
which it depends.
Copyright (c) 1998-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.1 page.
Created 2010.1.21.
| Allegro CL version 8.2 Unrevised from 8.1 to 8.2. 8.1 version |