You are looking at historical revision 28713 of this page. It may differ significantly from its current revision.

allegro

This document pertains to memory related methods found in the Allegro egg.

Please see the main [allegro] wiki page for more information.

Records

memory-interface

[record] memory-interface
[procedure] (make-memory-interface*)
[procedure] (make-memory-interface)
[procedure] (free-memory-interface! memory-interface)
[procedure] (memory-interface-malloc memory-interface)
[setter] (memory-interface-malloc-set! memory-interface (function c-pointer (integer32 integer (const c-string) (const c-string))))
[procedure] (memory-interface-realloc memory-interface)
[setter] (memory-interface-realloc-set! memory-interface (function void (c-pointer integer (const c-string) (const c-string))))
[procedure] (memory-interface-calloc memory-interface)
[setter] (memory-interface-calloc-set! memory-interface (function c-pointer (c-pointer integer32 integer (const c-string) (const c-string))))
[procedure] (memory-interface-free memory-interface)
[setter] (memory-interface-free-set! memory-interface (function c-pointer (integer32 integer32 integer (const c-string) (const c-string))))

Functions

Memory

[procedure] (memory-interface-set! memory-interface)

Implements al_set_memory_interface.

[procedure] (malloc* integer)

Implements al_malloc.

[procedure] (malloc integer)

Implements al_malloc, with (free!) declared as a finalizer.

[procedure] (free! ptr)

Implements al_free.

[procedure] (realloc* ptr integer)

Implements al_realloc.

[procedure] (realloc ptr integer)

Implements al_realloc, with (free!) declared as a finalizer.

[procedure] (calloc* integer integer)

Implements al_calloc.

[procedure] (calloc integer integer)

Implements al_calloc, with (free!) declared as a finalizer.

[procedure] (malloc/context* (int size) (int line) (string file) (string function))

Implements al_malloc_with_context.

[procedure] (malloc/context (int size) (int line) (string file) (string function))

Implements al_malloc_with_context, with (free/context!) declared as a finalizer.

[procedure] (free/context! ptr (int line) (string file) (string function))

Implements al_free_with_context.

[procedure] (realloc/context* ptr (int size) (int line) (string file) (string function))

Implements al_realloc_with_context.

[procedure] (realloc/context ptr (int size) (int line) (string file) (string function))

Implements al_realloc_with_context, with (free/context!) declared as a finalizer.

[procedure] (calloc/context* (int count) (int size) (int line) (string file) (string function))

Implements al_calloc_with_context.

[procedure] (calloc/context (int count) (int size) (int line) (string file) (string function))

Implements al_calloc_with_context, with (free/context!) declared as a finalizer.

Memory Files

[procedure] (open-memfile* (c-pointer mem) (unsigned-integer size) (string mode))

Implements al_open_memfile.

[procedure] (open-memfile (c-pointer mem) (unsigned-integer size) (string mode))

Implements al_open_memfile, with (free&close-file!) declared as a finalizer.

[procedure] (memfile-version)

Implements al_get_allegro_memfile_version.

Miscellaneous

[procedure] (combine-flags converter flags)

For combining enum flags together, ie:

(combine-flags display-flag->int '(windowed opengl resizable generate-expose-events))
[procedure] (make-id a b c d)

Implements AL_ID.

[procedure] (run-main argc argv (function integer (integer (c-pointer c-string))))

Implements al_run_main.

[procedure] (init-everything)

Initializes all sub-systems.

[procedure] (init-symbol s)

Initializes sub-systems by symbol-name. Valid symbols are: allegro, audio, font, image, joystick, keyboard, mouse, primitives, and ttf.

[procedure] (init-this arg)

Initializes sub-systems either by a single symbol or by a list of symbols. Ie:

(init-this (list 'allegro 'audio 'font 'image 'joystick 'keyboard 'mouse 'primitives 'ttf))
[procedure] (uninstall-everything)

Attempts to uninitialize all loaded sub-systems.

[procedure] (uninstall-this arg)

Attempts to uninitialize sub-systems by either a single symbol or by a list of symbols. Ie:

(uninstall-this (list 'system 'audio 'font 'image 'joystick 'keyboard 'mouse 'primitives 'ttf))