allegro
Allegro 5.0 bindings for Chicken.
Author
Dan Leslie (dan@ironoxide.ca)
Repository
The main repository can be found on GitHub.
Supported Versions
Allegro versions 5.0.x up to 5.2.x are supported.
Future version support will likely be added in the future. Patches are welcome!
Examples
A growing number of examples can be found on GitHub.
Please contribute!
Windows Extras
Since building all your packages on windows is a bit of a pain in the ass I've written the Egg with the assumption that you're using the pre-built Allegro libraries. The only extra step you'll need to do, after installing the prebuilt Allegro bins to your MingW32 directory should be:
# cd /MingW/lib # cp liballegro-INSTALLED_VERSION-monolith-md.a liballegro.a
Assuming, of course, that you've installed MingW32 to C:\Mingw
Naming Key
In general, the naming is fairly indicative of the function's behaviour.
The gist is something like this:
- make-type
- Constructs a type (Not always available)
- make-type*
- Constructs a type, returning a value which must be manually destructed
- free-type!
- Manually destructs a type (Not available for internally managed types)
- type-noun
- Accessor for value "noun" on a specific type
- type-noun-set!
- Mutator for value "noun" on a specific type
- type-verb
- Method which requires a specific type to operate
- type-verb!
- Method which modifies an object of a specific type
- verbage
- Function which operates on the global state
- verbage*
- Function which operates on the global state, but also returns a value which must be manually destructed
If a function begins with a type name then you can be assured that the first parameter will be an object of that specific type.
Audio
Constants
- audio-pan-none
Enums
audio-depth
[procedure] (audio-depth->int audio-depth){audio-depth may be one of the following symbols:
- int8
- int16
- int24
- float32
- unsigned
- uint8
- uint16
- uint24
channel-configuration
[procedure] (channel-configuration->int channel-configuration)channel-configuration may be one of the following symbols:
- one
- two
- three
- four
- five-one
- six-one
- seven-one
mixer-quality
[procedure] (mixer-quality->int mixer-quality)mixer-quality may be one of the following symbols:
- point
- linear
playmode
[procedure] (playmode->int playmode)playmode may be one of the following symbols:
- once
- loop
- bidirectional
Records
audio-stream
[record] audio-streammixer
[record] mixersample
[record] samplesample-id
[record] sample-idsample-instance
[record] sample-instancevoice
[record] voiceFunctions
Audio
[procedure] (make-sample* (blob buffer) (unsigned-integer samples) (unsigned-integer frequency) audio-depth channel-configuration (bool free-buffer))Implements al_create_sample.
[procedure] (make-sample (blob buffer) (unsigned-integer samples) (unsigned-integer frequency) audio-depth channel-configuration (bool free-buffer))Implements al_create_sample, with (free-sample!) declared as a finalizer.
[procedure] (free-sample! sample)Implements al_destroy_sample.
[procedure] (make-sample-instance* sample)Implements al_create_sample_instance.
[procedure] (make-sample-instance sample)Implements al_create_sample_instance, with (free-sample-instance!) declared as a finalizer.
[procedure] (free-sample-instance! sample)Implements al_destroy_sample_instance.
[procedure] (sample-frequency sample)Implements al_get_sample_frequenecy.
[procedure] (sample-length sample)Implements al_get_sample_length.
[procedure] (sample-depth sample)Implements al_get_sample_depth.
[procedure] (sample-channels sample)Implements al_get_sample_channels.
[procedure] (sample-instance-frequency sample-instance)Implements al_get_sample_instance_frequency.
[procedure] (sample-instance-length sample-instance)Implements al_get_sample_instance_length.
[procedure] (sample-instance-position sample-instance)Implements al_get_sample_instance-position.
[procedure] (sample-instance-speed sample-instance)Implements al_get_sample_instance_speed.
[procedure] (sample-instance-gain sample-instance)Implements al_get_sample_instance_gain.
[procedure] (sample-instance-pan sample-instance)Implements al_get_sample_instance_pan.
[procedure] (sample-instance-time sample-instance)Implements al_get_sample_instance_time.
[procedure] (sample-instance-depth sample-instance)Implements al_get_sample_instance_depth.
[procedure] (sample-instance-channels sample-instance)Implements al_get_sample_instance_channels.
[procedure] (sample-instance-playmode sample-instance)Implements al_get_sample_instance_playmode.
[procedure] (sample-instance-playing? sample-instance)Implements al_get_sample_instance_playing.
[procedure] (sample-instance-attached? sample-instance)Implements al_get_sample_instance_attached.
[procedure] (sample-instance-position-set! sample-instance unsigned-integer)Implements al_set_sample_instance_position.
[procedure] (sample-instance-length-set! sample-instance unsigned-integer)Implements al_set_sample_instance_length.
[procedure] (sample-instance-speed-set! sample-instance float)Implements al_set_sample_instance_speed.
[procedure] (sample-instance-gain-set! sample-instance float)Implements al_set_sample_instance_gain.
[procedure] (sample-instance-pan-set! sample-instance float)Implements al_set_sample_instance_pan.
[procedure] (sample-instance-playmode-set! sample-instance playmode)Implements al_set_sample_instance_playmode.
[procedure] (sample-instance-playing-set! sample-instance bool)Implements al_set_sample_instance_playing.
[procedure] (sample-instance-detach! sample-instance)Implements al_detach_sample_instance.
[procedure] (sample-instance-sample sample-instance)Implements al_get_sample.
[procedure] (sample-instance-sample-set! sample-instance sample)Implements al_set_sample
[procedure] (sample-instance-play sample-instance)Implements al_play_sample_instance.
[procedure] (sample-instance-stop sample-instance)Implements al_stop_sample_instance.
[procedure] (make-audio-stream* (integer buffer-count) (unsigned-integer samples) (unsigned-integer frequency) audio-depth channel-configuration)Implements al_create_audio_stream.
[procedure] (make-audio-stream (integer buffer-count) (unsigned-integer samples) (unsigned-integer frequency) audio-depth channel-configuration)Implements al_create_audio_stream, with (free-audio-stream!) declared as a finalizer.
[procedure] (free-audio-stream! audio-stream)Implements al_destroy_audio_stream.
[procedure] (audio-stram-drain audio-stream)Implements al_drain_audio_stream.
[procedure] (audio-stream-frequency audio-stream)Implements al_get_audio_stream_frequency.
[procedure] (audio-stream-length audio-stream)Implements al_get_audio_stream_length.
[procedure] (audio-stream-fragments audio-stream)Implements al_get_available_audio_stream_fragments.
[procedure] (audio-stream-available-fragments audio-stream)Implements al_get_available_audio_stream_fragments.
[procedure] (audio-stream-speed audio-stream)Implements al_get_audio_stream_speed.
[procedure] (audio-stream-gain audio-stream)Implements al_get_audio_stream_gain.
[procedure] (audio-stream-channels audio-stream)Implements al_get_audio_stream_channels.
[procedure] (audio-stream-depth audio-stream)Implements al_get_audio_stream_depth.
[procedure] (audio-stream-playmode audio-stream)Implements al_get_audio_stream_playmode.
[procedure] (audio-stream-playing? audio-stream)Implements al_get_audio_stream_playing.
[procedure] (audio-stream-attached? audio-stream)Implements al_get_audio_stream_attached.
[procedure] (audio-stream-fragment audio-stream)Implements al_get_audio_stream_fragment.
[procedure] (audio-stream-speed-set! audio-stream float)Implements al_set_audio_stream_speed.
[procedure] (audio-stream-gain-set! audio-stream float)Implements al_set_audio_stream_gain.
[procedure] (audio-stream-pan-set! audio-stream float)Implements al_set_audio_stream_pan.
[procedure] (audio-stream-playmode-set! audio-stream playmode)Implements al_set_audio_stream_playmode.
[procedure] (audio-stream-playing-set! audio-stream bool)Implements al_set_audio_stream_playing.
[procedure] (audio-stream-detach! audio-stream)Implements al_detach_audio_stream.
[procedure] (audio-stream-fragment-set! audio-stream c-pointer)Implements al_set_audio_stream_fragment.
[procedure] (audio-stream-rewind! audio-stream)Implements al_rewind_audio_stream.
[procedure] (audio-stream-seek-seconds! audio-stream double)Implements al_seek_audio_stream_secs.
[procedure] (audio-stream-position-seconds audio-stream)Impements al_get_audio_stream_position_secs.
[procedure] (audio-stream-length-seconds audio-stream)Implements al_get_audio_length_secs.
[procedure] (audio-stream-loop-set! audio-stream (double start-seconds) (double end-seconds))Implements al_set_audio_stream_loop_secs.
[procedure] (audio-stream-event-source audio-stream)Implements al_get_audio_stream_event_source.
[procedure] (make-mixer* (unsigned-integer frequency) audio-depth channel-configuration)Implements al_create_mixer.
[procedure] (make-mixer (unsigned-integer frequency) audio-depth channel-configuration)Implements al_create_mixer, with (free-mixer!) declared as a finalizer.
[procedure] (free-mixer! mixer)Implements al_destroy_mixer.
[procedure] (sample-instance-attach-to-mixer! sample-instance mixer)Implements al_attach_sample_instance_to_mixer.
[procedure] (audio-stream-attach-to-mixer! audio-stream mixer)Implements al_attach_audio_stram_to_mixer.
[procedure] (mixer-attach-to-mixer! mixer mixer)Implements al_attach_mixer_to_mixer.
[procedure] (mixer-postprocess-callback-set! mixer (function void (c-pointer unsigned-integer32 c-pointer)) (c-pointer data))Implements al_set_mixer_postprocess_callback.
[procedure] (mixer-frequency mixer)Implements al_get_mixer_frequency.
[procedure] (mixer-channels mixer)Implements al_get_mixer_channels.
[procedure] (mixer-depth mixer)Implements al_get_mixer_depth.
[procedure] (mixer-quality mixer)Implements al_get_mixer_quality.
[procedure] (mixer-playing? mixer)Implements al_get_mixer_playing.
[procedure] (mixer-attached? mixer)Implements al_get_mixer_attached.
[procedure] (mixer-frequency-set! mixer unsigned-integer)Implements al_set_mixer_frequency.
[procedure] (mixer-quality-set! mixer mixer-quality)Implements al_set_mixer_quality.
[procedure] (mixer-playing-set! mixer bool)Implements al_set_mixer_playing.
[procedure] (mixer-detach! mixer)Implements al_detach_mixer.
[procedure] (make-voice* (unsigned-integer frequency) audio-depth channel-configuration)Implements al_create_voice.
[procedure] (make-voice (unsigned-integer frequency) audio-depth channel-configuration)Implements al_create_voice, with (free-voice!) declared as a finalizer.
[procedure] (free-voice! voice)Implements al_destroy_voice.
[procedure] (sample-instance-attach-to-voice! sample-instance voice)Implements al_attach_sample_instance_to_voice.
[procedure] (audio-stream-attach-to-voice! audio-stram voice)Implements al_attach_audio_stream_to_voice.
[procedure] (mixer-attach-to-voice! mixer voice)Implements al_attach_mixer_to_voice.
[procedure] (voice-detach! voice)Implements al_detach_voice.
[procedure] (voice-frequency voice)Implements al_get_voice_frequency.
[procedure] (voice-position voice)Implements al_get_voice_position voice)</procedure>
[procedure] (voice-channels voice)Implements al_get_voice_channels.
[procedure] (voice-depth voice)Implements al_get_voice_depth.
[procedure] (voice-playing? voice)Implements al_get_voice_playing.
[procedure] (voice-position-set! voice unsigned-integer)Implements al_set_voice_position.
[procedure] (voice-playing-set! voice bool)Implements al_set_voice_playing.
[procedure] (audio-addon-install)Implements al_install_audio.
[procedure] (audio-addon-uninstall)Implements al_uninstall_audio.
[procedure] (audio-addon-installed?)Implements al_is_audio_installed.
[procedure] (audio-addon-version)Implements al_get_allegro_audio_version.
[procedure] (channel-configuration-count channel-configuration)Implements al_get_channel_count.
[procedure] (audio-depth-size audio-depth)Implements al_get_audio_depth_size.
[procedure] (default-mixer)Implements al_get_default_mixer.
[procedure] (default-mixer-set! mixer)Implements al_set_default_mixer.
[procedure] (default-mixer-restore!)Implements al_restore_default_mixer.
[procedure] (sample-play sample (float gain) (float pan) (float speed) playmode sample-id)Implements al_play_sample.
The Sample ID is written to the provided sample-id struct.
[procedure] (sample-stop sample-id)Implements al_stop_sample.
[procedure] (reserve-samples integer)Implements al_reserve_samples.
[procedure] (stop-all-samples)Implements al_stop_samples.
[procedure] (register-sample-loader (string extension) (function sample ((const string))))Implements al_register_sample_loader.
[procedure] (register-sample-saver (string extension) (function bool ((const c-string) sample)))Implements al_register_sample_saver.
[procedure] (register-audio-stream-loader (string extension) (function audio-stream ((const string) size_t unsigned-integer32)))Implements al_register_audio_stream_loader.
[procedure] (register-sample-file-loader (string extension) (function sample (file)))Implements al_register_sample_loader_f.
[procedure] (register-sample-file-saver (string extension) (function bool (file sample)))Implements al_register_sample_saver_f.
[procedure] (register-audio-stream-file-loader (string extension) (function audio-stream (file size_t unsigned-integer)))Implements al_register_audio_stream_loader_f.
[procedure] (load-sample* string)Implements al_load_sample.
[procedure] (load-sample string)Implements al_load_sample, with (free-sample!) declared as a finalizer.
[procedure] (load-audio-stream* string (integer buffer-count) (unsigned-integer samples))Implements al_load_audio_stream.
[procedure] (load-audio-stream string (integer buffer-count) (unsigned-integer samples))Implements al_load_audio_stream, with (free-audio-stream!) declared as a finalizer.
[procedure] (load-audio-stream-from-file* file (string identity) (integer buffer-count) (unsigned-integer samples))Implements al_load_audio_straem_from_file.
[procedure] (load-audio-stream-from-file file (string identity) (integer buffer-count) (unsigned-integer samples))Implements al_load_audio_straem_from_file, with (free-audio-stream!) declared as a finalizer.
[procedure] (load-sample-from-file* file (string identity))Implements al_load_sample_f.
[procedure] (load-sample-from-file file (string identity))Implements al_load_sample_f, with (free-sample!) declared as a finalizer.
[procedure] (sample-save-to-file sample file (string identity))Implements al_save_sample_f.
[procedure] (sample-save sample (string filename))Implements al_save_sample.
Audio Codec Addon
[procedure] (acodec-addon-init)Implements al_init_acodec_addon.
[procedure] (acodec-addon-version)Implements al_get_allegro_acodec_version.
Bitmaps
Enums
bitmap-flag
[procedure] (bitmap-flag->int bitmap-flag)bitmap-flag may be one of the following symbols:
- memory-bitmap
- keep-bitmap-format
- force-locking
- no-preserve-texture
- alpha-test
- min-linear
- mag-linear
- mipmap
- no-premultiplied-alpha
- video-bitmap
blend-operation
[procedure] (blend-operation->int blend-operation)blend-operation may be one of the following symbols:
- add
- source-minus-destination
- destination-minus-source
blending-mode
[procedure] (blending-mode->int blending-mode)blending-mode may be one of the following symbols:
- zero
- one
- alpha
- inverse-alpha
blitting-flag
[procedure] (blitting-flag->int blitting-flag)blitting-flag may be one of the following symbols:
- flip-horizontal
- flip-vertical
locking-flag
[procedure] (locking-flag->int locking-flag)locking-flag may be one of the following symbols:
- read-write
- read-only
- write-only
pixel-format
[procedure] (pixel-format->int pixel-format)pixel-format may be one of the following symbols:
- any
- any-no-alpha
- any-with-alpha
- any-15-no-alpha
- any-16-no-alpha
- any-16-with-alpha
- any-24-no-alpha
- any-32-no-alpha
- any-32-with-alpha
- argb-8888
- rgba-8888
- argb-4444
- rgb-888
- rgb-565
- rgb555
- rgba-5551
- argb-1555
- abgr-8888
- xbgr-8888
- bgr-888
- bgr-565
- bgr-555
- rgbx-8888
- xrgb-8888
- abgr-f32
- abgr-8888-le
- rgba-4444
Records
bitmap
[record] bitmaplocked-region
[record] locked-region[procedure] (free-locked-region! locked-region)
[procedure] (locked-region-data locked-region)
[procedure] (locked-region-format locked-region)
[procedure] (locked-region-pitch locked-region)
[procedure] (locked-region-pixel-size locked-region)
Functions
Bitmap
[procedure] (new-bitmap-format-set! pixel-format)Implements al_set_new_bitmap_format.
[procedure] (new-bitmap-format)Implements al_get_new_bitmap_flags.
[procedure] (new-bitmap-flags-set! bitmap-flag)Implements al_set_new_bitmap_flags.
[procedure] (new-bitmap-flags)Implements al_get_new_bitmap_flags.
[procedure] (new-bitmap-add-flag bitmap-flag)Implements al_add_new_bitmap_flag.
[procedure] (make-bitmap* (integer width) (integer height))Implements al_create_bitmap.
[procedure] (make-bitmap (integer width) (integer height))Implements al_create_bitmap, with (free-bitmap!) declared as a finalizer.
[procedure] (bitmap-draw bitmap (float dx) (float dy) bitmap-flag)Implements al_draw_bitmap.
[procedure] (draw-bitmap bitmap (float dx) (float dy) bitmap-flag)Implements al_draw_bitmap.
[procedure] (bitmap-draw-region bitmap (float sx) (float sy) (float sw) (float sh) (float dx) (float dy) (integer bitmap-flags))Implements al_draw_bitmap_region.
[procedure] (draw-bitmap-region bitmap (float sx) (float sy) (float sw) (float sh) (float dx) (float dy) (integer bitmap-flags))Implements al_draw_bitmap_region.
[procedure] (bitmap-draw-scaled bitmap (float sx) (float sy) (float sw) (float sh) (float dx) (float dy) (float dw) (float dh) (integer bitmap-flags))Implements al_draw_scaled_bitmap.
[procedure] (draw-scaled-bitmap bitmap (float sx) (float sy) (float sw) (float sh) (float dx) (float dy) (float dw) (float dh) (integer bitmap-flags))Implements al_draw_scaled_bitmap.
[procedure] (bitmap-draw-rotated bitmap (float cx) (float cy) (float dx) (float dy) (float angle) (integer bitmap-flags))Implements al_draw_rotated_bitmap.
[procedure] (draw-rotated-bitmap bitmap (float cx) (float cy) (float dx) (float dy) (float angle) (integer bitmap-flags))Implements al_draw_rotated_bitmap.
[procedure] (bitmap-draw-scaled-rotated bitmap (float cx) (float cy) (float dx) (float dy) (float xscale) (float yscale) (float angle) (integer bitmap-flags))Implements al_draw_scaled_rotated_bitmap.
[procedure] (draw-scaled-rotated-bitmap bitmap (float cx) (float cy) (float dx) (float dy) (float xscale) (float yscale) (float angle) (integer bitmap-flags))Implements al_draw_scaled_rotated_bitmap.
[procedure] (bitmap-draw-tinted (bitmap bmp) (color tint) (float dx) (float dy) (integer bitmap-flags))Implements al_draw_tinted_bitmap.
[procedure] (draw-tinted-bitmap (bitmap bmp) (color tint) (float dx) (float dy) (integer bitmap-flags))Implements al_draw_tinted_bitmap.
[procedure] (bitmap-draw-tinted-region (bitmap bmp) (color tint) (float sx) (float sy) (float sw) (float sh) (float dx) (float dy) (integer bitmap-flags))Implements al_draw_tinted_bitmap_region.
[procedure] (draw-tinted-bitmap-region (bitmap bmp) (color tint) (float sx) (float sy) (float sw) (float sh) (float dx) (float dy) (integer bitmap-flags))Implements al_draw_tinted_bitmap_region.
[procedure] (bitmap-draw-tinted-scaled (bitmap bmp) (color tint) (float sx) (float sy) (float sw) (float sh) (float dx) (float dy) (float dw) (float dh) (integer flags))Implements al_draw_tinted_scale_bitmap.
[procedure] (draw-tinted-scaled-bitmap (bitmap bmp) (color tint) (float sx) (float sy) (float sw) (float sh) (float dx) (float dy) (float dw) (float dh) (integer flags))Implements al_draw_tinted_scale_bitmap.
[procedure] (bitmap-draw-tinted-rotated (bitmap bmp) (color tint) (float cx) (float cy) (float dx) (float dy) (float angle) (integer flags))Implements al_draw_tinted_rotated_bitmap.
[procedure] (draw-tinted-rotated-bitmap (bitmap bmp) (color tint) (float cx) (float cy) (float dx) (float dy) (float angle) (integer flags))Implements al_draw_tinted_rotated_bitmap.
[procedure] (bitmap-draw-tinted-scaled-rotated (bitmap bmp) (color tint) (float cx) (float cy) (float dx) (float dy) (float xscale) (float yscale) (float angle) (integer flags))Implements al_draw_tinted_scaled_rotated_bitmap.
[procedure] (draw-tinted-scaled-rotated-bitmap (bitmap bmp) (color tint) (float cx) (float cy) (float dx) (float dy) (float xscale) (float yscale) (float angle) (integer flags))Implements al_draw_tinted_scaled_rotated_bitmap.
[procedure] (bitmap-lock*! bitmap pixel-format (integer locking-flag))Implements al_lock_bitmap.
[procedure] (lock-bitmap*! bitmap pixel-format (integer locking-flag))Implements al_lock_bitmap.
[procedure] (bitmap-lock-region*! bitmap (integer x) (integer y) (integer width) (integer height) pixel-format (integer locking-flag))Implements al_lock_bitmap_region.
[procedure] (lock-bitmap-region*! bitmap (integer x) (integer y) (integer width) (integer height) pixel-format (integer locking-flag))Implements al_lock_bitmap_region.
[procedure] (bitmap-unlock! bitmap)Implements al_unlock_bitmap.
[procedure] (unlock-bitmap! bitmap)Implements al_unlock_bitmap.
[procedure] (bitmap-lock! bitmap pixel-format (integer bitmap-flags))Implements al_lock_bitmap, with (bitmap-unlock!) and (free-locked-region!) declared as finalizers.
[procedure] (lock-bitmap! bitmap pixel-format (integer bitmap-flags))Implements al_lock_bitmap, with (bitmap-unlock!) and (free-locked-region!) declared as finalizers.
[procedure] (bitmap-lock-region! bitmap (integer x) (integer y) (integer width) (integer height) pixel-format (integer bitmap-flags))Implements al_lock_bitmap_region, with (bitmap-unlock!) and (free-locked-region!) declared as finalizers.
[procedure] (lock-bitmap-region! bitmap (integer x) (integer y) (integer width) (integer height) pixel-format (integer bitmap-flags))Implements al_lock_bitmap_region, with (bitmap-unlock!) and (free-locked-region!) declared as finalizers.
[procedure] (bitmap-pixel! (bitmap bmp) (int x) (int y) (color c))Sets the provided color struct to the color value at the given coordinates.
[procedure] (bitmap-pixel* (bitmap bmp) (int x) (int y))Returns a new color struct of the color value at the given coordinates.
[procedure] (bitmap-pixel (bitmap bmp) (int x) (int y))Returns a new color struct of the color value at the given coordinates, with (free-color!) declared as a finalizer.
[procedure] (bitmap-width bitmap)Implements al_get_bitmap_width.
[procedure] (bitmap-height bitmap)Implements al_get_bitmap_height.
[procedure] (bitmap-format bitmap)Implements al_get_bitmap_format.
[procedure] (bitmap-flags bitmap)Implements al_get_bitmap_flags.
[procedure] (bitmap-mask->alpha! bitmap color)Implements al_convert_mask_to_alpha.
[procedure] (bitmap-clone* bitmap)Implements al_clone_bitmap.
[procedure] (bitmap-clone bitmap)Implements al_clone_bitmap, with (free-bitmap!) declared as a finalizer.
[procedure] (bitmap-locked? bitmap)Implements al_is_bitmap_locked.
[procedure] (bitmap-put-pixel! bitmap (integer x) (integer y) (color c))Implements _al_put_pixel.
[procedure] (make-sub-bitmap* bitmap (integer x) (integer y) (integer width) (integer height))Implements al_create_sub_bitmap.
[procedure] (make-sub-bitmap bitmap (integer x) (integer y) (integer width) (integer height))Implements al_create_sub_bitmap, with (free-bitmap!) declared as a finalizer.
[procedure] (sub-bitmap? bitmap)Implements al_is_sub_bitmap.
[procedure] (put-pixel (integer x) (integer y) (color c))Implements al_put_pixel.
[procedure] (put-blended-pixel (integer x) (integer y) (color c))Implements al_put_blended_pixel.
[procedure] (pixel-size pixel-format)Implements al_get_pixel_size.
[procedure] (color-map-rgb! (color c) (unsigned-byte r) (unsigned-byte g) (unsigned-byte b))Maps rgb values onto the provided color struct, implementing al_map_rgb.
[procedure] (color-map-rgba! (color c) (unsigned-byte r) (unsigned-byte g) (unsigned-byte b) (unsigned-byte a))Maps rgba values onto the provided color struct, implementing al_map_rgba.
[procedure] (color-map-rgb-float! (color c) (unsigned-byte r) (unsigned-byte g) (unsigned-byte b))Maps rgb values onto the provided color struct, implementing al_map_rgb_f.
[procedure] (color-map-rgba-float! (color c) (unsigned-byte r) (unsigned-byte g) (unsigned-byte b) (unsigned-byte a))Maps rgba values onto the provided color struct, implementing al_map_rgba_f.
[procedure] (map-rgb* r g b)Returns a new color struct mapped to the given rgb values.
[procedure] (map-rgb r g b)Returns a new color struct mapped to the given rgb values, with (free-color!) declared as a finalizer.
[procedure] (map-rgba* r g b a)Prodcues a new color struct mapped to the given rgba values.
[procedure] (map-rgba r g b a)Returns a new color struct mapped to the given rgba values, with (free-color!) declared as a finalizer.
[procedure] (map-rgb-float* r g b)Returns a new color struct mapped to the given rgb values.
[procedure] (map-rgb-float r g b)Returns a new color struct mapped to the given rgb values, with (free-color!) declared as a finalizer.
[procedure] (map-rgba-float* r g b a)Returns a new color struct mapped to the given rgba values.
[procedure] (map-rgba-float r g b a)Returns a new color struct mapped to the given rgba values, with (free-color!) declared as a finalizer.
[procedure] (color-unmap-rgb color)Returns a 3-element list of the rgb values representing a given color struct.
[procedure] (color-unmap-rgba color)Returns a 4-element list of the rgba values representing a given color struct.
[procedure] (color-unmap-rgb-float color)Returns a 3-element list of the rgb values representing a given color struct.
[procedure] (color-unmap-rgba-float color)Returns a 4-element list of the rgb values representing a given color struct.
[procedure] (pixel-format-bits pixel-format)Implements al_get_pixel_format_bits.
[procedure] (clipping-rectangle)Returns a 4-element list of the x, y, width and height values of the current clipping rectangle.
[procedure] (clippingle-rectangle-set! (integer x) (integer y) (integer width) (integer height))Sets the current clipping rectangle.
[procedure] (blender)Returns a 3-element list of the op, source and destination of the current blender.
[procedure] (blender-set! (blend-operation op) (integer source) (integer destination))Implements al_set_blender.
[procedure] (separate-blender)Returns a 6-element list of the op, source, destination, alpha op, alpha source, and alpha destination.
[procedure] (separate-blender-set! (blend-operation op) (integer src) (integer destination) (integer alpha-op) (integer alpha-source) (integer alpha-destination))Implements al_set_separate_blender.
Bitmap I/O
[procedure] (register-bitmap-loader (string extension) (function bitmap ((const c-string))))Implements al_register_bitmap_loader.
[procedure] (register-bitmap-file-loader (string extension) (function bitmap (file)))Implements al_register_bitmap_loader_f.
[procedure] (register-bitmap-saver (string extension) ((function bool ((const c-string) bitmap)) saver))Implements al_register_bitmap_saver.
[procedure] (register-bitmap-file-saver (string extension) ((function bool (file bitmap)) saver))Implements al_register_bitmap_saver_f.
[procedure] (load-bitmap* string)Implements al_load_bitmap.
[procedure] (load-bitmap string)Implements al_load_bitmap, with (free-bitmap!) declared as a finalizer.
[procedure] (load-bitmap-from-file* file string)Implements al_load_bitmap_f.
[procedure] (load-bitmap-from-file file string)Implements al_load_bitmap_f, with (free-bitmap!) declared as a finalizer.
[procedure] (bitmap-save bitmap string)Implements al_save_bitmap.
[procedure] (bitmap-save-to-file bitmap file string)Implements al_save_bitmap_f.
Colors
Records
color
[record] color[procedure] (make-color*)
[procedure] (make-color)
[procedure] (free-color! color)
[procedure] (color-red color)
[procedure] (color-green color)
[procedure] (color-blue color)
[procedure] (color-alpha color)
Functions
Color
[procedure] (color-addon-version)Implements al_get_allegro_color_version.
[procedure] (hsv->rgb (float h) (float s) (float v))Returns a 3-element list consisting of the rgb elements.
[procedure] (rgb->hsl (float red) (float green) (float blue))Returns a 3-element list consisting of the hsl elements.
[procedure] (hsl->rgb (float hue) (float saturation) (float lightness))Returns a 3-element list consisting of the rgb elements.
[procedure] (name->rgb string)Returns a 3-element list consisting of the rgb elements.
[procedure] (rgb->name (float red) (float green) (float blue))Returns a string representation of the rgb elements.
[procedure] (cmyk->rgb (float cyan) (float magenta) (float yellow) (float key))Returns a 3-element list consisting of the rgb elements.
[procedure] (rgb->cmyk (float red) (float green) (float blue))Returns a 4-element list consisting of the cmyk elements.
[procedure] (yuv->rgb (float y) (float u) (float v))Returns a 3-element list consisting of the rgb elements.
[procedure] (rgb->yuv (float red) (float green) (float blue))Returns a 3-element list consisting of the yuv elements.
[procedure] (rgb->html (float red) (float green) (float blue))Returns a string consisting of the html representation.
[procedure] (html->rgb string)Returns a 3-element list consisting of the rgb elements.
[procedure] (make-color-rgb* (integer r) (integer g) (integer b))Creates a color struct from rgb elements.
[procedure] (make-color-rgb (integer r) (integer g) (integer b))Creates a color struct from rgb elements, with (free-color!) declared as a finalizer.
[procedure] (make-color-rgba*(integer r) (integer g) (integer b) (integer a))Creates a color struct from rgba elements.
[procedure] (make-color-rgba (integer r) (integer g) (integer b) (integer a))Creates a color struct from rgba elements, with (free-color!) declared as a finalizer.
[procedure] (make-color-yuv* (integer y) (integer u) (integer v))Creates a color struct from yuv elements.
[procedure] (make-color-yuv (integer y) (integer u) (integer v))Creates a color struct from yuv elements, with (free-color!) declared as a finalizer.
[procedure] (make-color-cmyk* (integer c) (integer m) (integer y) (integer k))Creates a color struct from cmyk elements.
[procedure] (make-color-cmyk (integer c) (integer m) (integer y) (integer k))Creates a color struct from cmyk elements, with (free-color!) declared as a finalizer.
[procedure] (make-color-hsl*(integer h) (integer s) (integer l))Creates a color struct from hsl elements.
[procedure] (make-color-hsl (integer h) (integer s) (integer l))Creates a color struct from hsl elements, with (free-color!) declared as a finalizer.
[procedure] (make-color-hsv*(integer h) (integer s) (integer v))Creates a color struct from hsv elements.
[procedure] (make-color-hsv (integer h) (integer s) (integer v))Creates a color struct from hsv elements, with (free-color!) declared as a finalizer.
[procedure] (make-color-name* string)Creates a color struct from a string name.
[procedure] (make-color-name string)Creates a color struct from a string name, with (free-color!) declared as a finalizer.
[procedure] (make-color-html* string)Creates a color struct from a html representation.
[procedure] (make-color-html string)Creates a color struct from a html representation, with (free-color!) declared as a finalizer.
[procedure] (color-yuv! color (float y) (float u) (float v))Maps yuv elements to a color struct.
[procedure] (color-cmyk! color (float c) (float m) (float y) (float k))Maps cmyk elements to a color struct.
[procedure] (color-hsl! color (float h) (float s) (float l))Maps hsl elements to a color struct.
[procedure] (color-hsv! color (float h) (float s) (float v))Maps hsv elements to a color struct.
[procedure] (color-name! color string)Maps a color name to a color struct.
[procedure] (color-html! color string)Maps a html representation to a color struct.
Config
Records
config
[record] configconfig-entry
<record>config-entry</config>
config-section
[record] config-sectionFunctions
Config Files
[procedure] (make-config*)Implements al_create_config.
[procedure] (make-config)Implements al_create_config, with (free-config!) declared as a finalizer.
[procedure] (free-config! config)Implements al_destroy_config.
[procedure] (config-section-add! config string)Implements al_add_config_section.
[procedure] (config-value-set! config (string section) (string key) (string value))Implements al_set_config_value.
[procedure] (config-comment-add! config (string section) (string comment))Implements al_add_config_comment.
[procedure] (config-value config (string section) (string key))Implements al_get_config_value.
[procedure] (load-config* string)Implements al_load_config_file.
[procedure] (load-config string)Implements al_load_config_file, with (free-config!) decalred as a finalizer.
[procedure] (load-config-from-file* file)Implements al_load_config_file_f.
[procedure] (load-config-from-file file)Implements al_load_config_file_f, with (free-config!) declared as a finalizer.
[procedure] (config-save config string)Implements al_save_config_file.
[procedure] (config-save-to-file config file)Implements al_save_config_file_f.
[procedure] (config-merge! config config)Implements al_merge_config_into.
[procedure] (config-merge config config)Implements al_merge_config.
[procedure] (config-sections config)Creates an iterator that covers the sections of the given config.
Returns values of the form (list config-section promise).
(force) the promise to get the next section.
Needs testing!
[procedure] (config-entries config config-section)Creates an iterator that covers the entries of the given config and config-section.
Returns values of the form (list config-entry promise).
(force) the promise to get the next entry.
Needs testing!
Debugging
Functions
Debugging
[procedure] (trace-prefix (string channel) (int level) (string file) (int line) (string function))Implements _al_trace_prefix.
[procedure] (trace-level-debug)Implements ALLEGRO_DEBUG.
[procedure] (trace-level-info)Implements ALLEGRO_INFO.
[procedure] (trace-level-warn)Implements ALLEGRO_WARN.
[procedure] (trace-level-error)Implements ALLEGRO_ERROR.
[procedure] (debug-assert bool)Implements ALLEGRO_ASSERT.
Errors
[procedure] (error-number)Implements al_get_errno.
[procedure] (error-number-set!)Implements al_set_errno.
Displays
Constants
- default-display-adapter
- vertex-cache-size
Enums
display-flag
[procedure] (display-flag->int display-flag)display-flag may be one of the following symbols:
- windowed
- fullscreen
- opengl
- direct3d-internal
- resizable
- noframe
- generate-expose-events
- opengl3
- opengl-forward-compatible
- fullscreen-window
- minimized
display-option
[procedure] (display-option->int display-option)display-option may be one of the following symbols:
- red-size
- green-size
- blue-size
- alpha-size
- red-shift
- green-shift
- blue-shift
- alpha-shift
- acc-red-size
- acc-green-size
- acc-blue-size
- acc-alpha-size
- stereo
- aux-buffers
- color-size
- depth-size
- stencil-size
- sample-buffers
- samples
- render-method
- float-color
- float-depth
- single-buffer
- swap-method
- compatible-display
- update-display-region
- vsync
- max-bitmap-size
- support-npot-bitmap
- can-draw-into-bitmap
- support-separate-alpha
display-option-importance
[procedure] (display-option-importance->int display-option-importance)display-option-importance may be one of the following symbols:
- dont-care
- require
- suggest
display-orientation
[procedure] (display-orientation->int display-orientation)display-orientation may be one of the following symbols:
- degrees-0
- degrees-90
- degrees-180
- degrees-270
- face-up
- face-down
gl-variant
[procedure] (gl-variant->int gl-variant)gl-variant may be one of the following symbols:
- opengl
- opengl-es
Records
display
[record] displaydisplay-mode
[record] display-mode[procedure] (make-display-mode*)
[procedure] (make-display-mode)
[procedure] (free-display-mode! display-mode)
[procedure] (display-mode-width display-mode)
[setter] (display-mode-width-set! display-mode integer)
[procedure] (display-mode-height display-mode)
[setter] (display-mode-height-set! display-mode integer)
[procedure] (display-mode-format display-mode)
[setter] (display-mode-format-set! display-mode pixel-format)
[procedure] (display-mode-refresh-rate display-mode)
[setter] (display-mode-refresh-rate-set! display-mode integer)
monitor
[record] monitor[procedure] (make-monitor*)
[procedure] (make-monitor)
[procedure] (free-monitor! monitor)
[procedure] (monitor-x1 monitor)
[procedure] (monitor-y1 monitor)
[procedure] (monitor-x2 monitor)
[procedure] (monitor-y2 monitor)
Functions
Display
[procedure] (new-display-refresh-rate)Implements al_get_new_display_refresh_rate.
[procedure] (new-display-refresh-rate-set! integer)Implements al_set_new_display_refresh_rate.
[procedure] (new-display-flags)Implements al_get_new_display_flags.
[procedure] (new-display-flags-set! integer)Implements al_set_new_display_flags.
[procedure] (new-display-adapter)Implements al_get_new_display_adapter.
[procedure] (new-display-adapter-set! integer)Implements al_set_new_display_adpater.
[procedure] (new-display-window-position)Returns a 2-element list consisting of the new display coordinates.
[procedure] (new-display-window-position-set! (integer x) (integer y))Sets the a new display's window position.
[procedure] (new-display-option-value display-option)Retrieves the value for a particular display-option for newly created displays.
[procedure] (new-display-option-importance display-option)Retrieves the importance for a particular display-option for newly created dispalys.
[procedure] (new-display-option-set! display-option (integer value) display-option-importance)Implements al_set_new_display_option.
[procedure] (new-display-reset-options)Implements al_reset_new_display_options.
[procedure] (make-display* (integer width) (integer height))Implements al_create_display.
[procedure] (make-display (integer width) (integer height))Implements al_create_display, with (free-display!) declared as a finalizer.
[procedure] (make-display/mode* display-mode (integer adapter) (integer flags))Creates a new display, taking the refresh rate, width and height from a display-mode struct.
[procedure] (make-display/mode display-mode (integer adapter) (integer flags))Creates a new display, taking the refresh rate, width and height from a display-mode struct, with (free-display-mode!) declared as a finalizer.
[procedure] (free-display! display)Implements al_destroy_display.
[procedure] (current-display)Implements al_get_current_display.
[procedure] (display-mode-count)Implements al_get_num_display_modes.
[procedure] (display-mode-init! display-mode (integer index))Implements al_get_display_mode, returning #f if unsuccessful.
[procedure] (update-display-region! (integer x) (integer y) (integer width) (integer height))Implements al_update_display_region.
[procedure] (compatible-bitmap? bitmap)Implements al_is_compatible_bitmap.
[procedure] (wait-for-vsync)Implements al_wait_for_vsync.
[procedure] (draw-pixel (float x) (floay y) color)Implements al_draw_pixel.
[procedure] (video-adapter-count)Implements al_get_num_video_adapters.
[procedure] (monitor-init! monitor (integer adapter))Implements al_get_monitor_info.
[procedure] (display-option display display-option)Implements al_get_display_option.
[setter] (display-hold-bitmap-drawing! bool)Implements al_hold_bitmap_drawing.
[procedure] (display-bitmap-drawing-held?)Implements al_is_bitmap_drawing_help.
[procedure] (display-window-title-set! display string)Implements al_set_window_title.
[procedure] (display-width display)Implements al_get_display_width.
[procedure] (display-height display)Implements al_get_display_height.
[procedure] (display-format display)Implements al_get_display_format.
[procedure] (display-refresh-rate display)Implements al_get_display_refresh_rate.
[procedure] (display-flags display)Implements al_get_display_flags.
[procedure] (display-toggle-flag! display display-flag bool)Implements al_toggle_display_flag.
[procedure] (display-backbuffer display)Implements al_get_backbuffer.
[procedure] (display-acknowledge-resize display)Implements al_acknowledge_resize.
[procedure] (display-resize! display (integer width) (integer height))Implements al_resize_display.
[procedure] (display-event-source display)Implements al_get_display_event_source.
[procedure] (display-iconset! display bitmap)Implements al_set_display_icon.
[procedure] (clear-to-color color)Implements al_clear_to_color.
[procedure] (target-bitmap)Implements al_get_target_bitmap.
[procedure] (target-bitmap-set! bitmap)Implements al_set_target_bitmap.
[procedure] (target-backbuffer-set! display)Implements al_set_target_backbuffer.
[procedure] (flip-display)Implements al_flip_display.
Direct3D
[procedure] (d3d-non-pow2-texture-support?)Implements al_have_d3d_non_pow2_texture_support.
[procedure] (d3d-non-square-texture-support?)Implements al_have_d3d_non_square_texture_support.
Bitmap Specific
[procedure] (bitmap-d3d-system-texture bitmap)Implements al_get_d3d_system_texture.
[procedure] (bitmap-d3d-video-texture bitmap)Implements al_get_d3d_video_texture.
[procedure] (bitmap-d3d-texture-position bitmap)Returns a 2-element list consisting of a u, v pair.
Display Specific
[procedure] (display-d3d-device-lost? display)Implements al_is_d3d_device_lost.
[procedure] (display-d3d-device display)Implements al_get_d3d_device.
OpenGL
[procedure] (opengl-addon-version)Implements al_get_opengl_version.
[procedure] (opengl-extension-exists? string)Implements al_have_opengl_extension.
[procedure] (opengl-proc-address string)Implements al_get_opengl_proc_address.
[procedure] (opengl-texture bitmap)Implements al_get_opengl_texture.
[procedure] (opengl-remove-fbo! bitmap)Implements al_remove_opengl_fbo.
[procedure] (opengl-fbo bitmap)Implements al_get_opengl_fbo.
[procedure] (opengl-texture-size bitmap)Returns a 2-element list of the width and height of the opengl texture for the given bitmap.
[procedure] (opengl-texture-position bitmap)Returns a 2-element list of the u,v position of the opengl texture for the given bitmap.
[procedure] (opengl-context-set! display)Implements al_set_current_opengl_context.
[procedure] (opengl-variant)Implements al_get_opengl_variant.
Windows
[procedure] (windows-window-handle)Implements al_get_win_window_handle.
Drawing
Constants
- primitive-quality
Enums
primitive-attribute
[procedure] (primitive-attribute->int primitive-attribute)primitive-attribute may be one of the following symbols:
- position
- color
- texture-coordinate
- texture-pixel-coordinate
primitive-type
[procedure] (primitive-type->int primitive-type)primitive-type may be one of the following symbols:
- line-list
- line-strip
- line-loop
- triangle-list
- triangle-strip
- point-list
primitive-storage
[procedure] (primitive-storage->int primitive-storage)primitive-storage may be one of the following symbols:
- float-2
- float-3
- short-2
Records
transform
[record] transform[procedure] (make-transform*)
[procedure] (make-transform)
[procedure] (free-transform! transform)
[procedure] (transform-value transform i j)
vertex
[record] vertex[procedure] (make-vertex*)
[procedure] (make-vertex)
[procedure] (free-vertex! vertex)
[procedure] (vertex-x vertex)
[setter] (vertex-x-set! vertex float)
[procedure] (vertex-y vertex)
[setter] (vertex-y-set! vertex float)
[procedure] (vertex-z vertex)
[setter] (vertex-z-set! vertex float)
[procedure] (vertex-u vertex)
[setter] (vertex-u-set! vertex float)
[procedure] (vertex-v vertex)
[setter] (vertex-v-set! vertex float)
vertex-declaration
[record] vertex-declarationvertex-element
[record] vertex-element[procedure] (make-vertex-element*)
[procedure] (make-vertex-element)
[procedure] (free-vertex-element! vertex-element)
[procedure] (vertex-element-attribute vertex-element)
[setter] (vertex-element-attribute-set! vertex-element primitive-attribute)
[procedure] (vertex-element-storage vertex-element)
[setter] (vertex-element-storage-set! vertex-element primitive-storage)
[procedure] (vertex-element-offset vertex-element)
[setter] (vertex-element-offset-set! vertex-element integer)
Functions
Image Formats
[procedure] (image-addon-install)Implements al_init_image_addon.
[procedure] (image-addon-uninstall)Implements al_shutdown_image_addon.
[procedure] (image-addon-version)Implements al_get_allegro_image_version.
Primitives
[procedure] (primitives-addon-version)Implements al_get_allegro_primitives_version.
[procedure] (primitives-addon-install)Implements al_init_primitives_addon.
[procedure] (primitives-addon-uninstall)Implements al_shutdown_primitives_addon.
[procedure] (make-vertex-declaration* vertex-element integer)Implements al_create_vertex_decl.
[procedure] (make-vertex-declaration vertex-element integer)Implements al_create_vertex_decl, with (free-vertex-declaration!) declared as a finalizer.
[procedure] (free-vertex-declaration! vertex-declaration)Implements al_destroy_vertex_decl.
[procedure] (draw-primitive (c-pointer vertices) vertex-declaration bitmap (integer start) (integer end) primitive-type)Implements al_draw_prim.
[procedure] (draw-indexed-primitive (c-pointer vertices) vertex-declaration bitmap (s32-vector indices) (integer count) primitive-type)Implements al_draw_indexed_prim.
<procedure>(draw-soft-triangle (vertex v1) (vertex v2) (vertex v3) (uintptr state)
((function void (uintptr vertex vertex vertex)) init) ((function void (uintptr int int int int)) first) ((function void (uintptr int)) step) ((function void (uintptr int int int)) draw))</procedure>
Implements al_draw_soft_triangle.
<procedure>(draw-soft-line (vertex v1) (vertex v2) (uintptr state)
((function void (uintptr int int vertex vertex)) first) ((function void (uintptr int)) step) ((function void (uintptr int int)) draw))</procedure>
Implements al_draw_soft_line.
[procedure] (draw-line (float x1) (float y1) (float x2) (float y2) (color c) (float thickness))Implements al_draw_line.
[procedure] (draw-triangle (float x1) (float y1) (float x2) (float y2) (float x3) (float y3) (color c) (float thickness))Implements al_draw_triangle.
[procedure] (draw-rectangle (float x1) (float y1) (float x2) (float y2) (color c) (float thickness))Implements al_draw_rectangle.
[procedure] (draw-rounded-rectangle (float x1) (float y1) (float x2) (float y2) (float rx) (float ry) (color c) (float thickness))Implements al_draw_rounded_rectangle.
[procedure] (draw-circle (float cx) (float cy) (float r) (color c) (float thickness))Implements al_draw_circle.
[procedure] (draw-ellipse (float cx) (float cy) (float rx) (float ry) (color c) (float thickness))Implements al_draw_ellipse.
[procedure] (draw-arc (float cx) (float cy) (float r) (float start_theta) (float delta_theta) (color c) (float thickness))Implements al_draw_arc.
[procedure] (draw-spline (f32vector points) (color c) (float thickness))Implements al_draw_spline.
[procedure] (draw-ribbon (f32vector points) (integer32 stride) (color c) (float thickness) (integer32 num_segments))Implements al_draw_ribbon.
[procedure] (draw-triangle/fill (float x1) (float y1) (float x2) (float y2) (float x3) (float y3) (color c))Implements al_draw_filled_triangle.
[procedure] (draw-rectangle/fill (float x1) (float y1) (float x2) (float y2) (color c))Implements al_draw_filled_rectangle.
[procedure] (draw-rounded-rectangle/fill (float x1) (float y1) (float x2) (float y2) (float rx) (float ry) (color c))Implements al_draw_filled_rounded_rectangle.
[procedure] (draw-circle/fill (float cx) (float cy) (float r) (color c))Implements al_draw_filled_circle.
[procedure] (draw-ellipse/fill (float cx) (float cy) (float rx) (float ry) (color c))Implements al_draw_filled_ellipse.
[procedure] (calculate-arc (integer32 stride) (float cx) (float cy) (float rx) (float ry) (float start_theta) (float delta_theta) (float thickness) (integer32 num_segments))Implements al_calculate_arc.
[procedure] (calculate-spline (integer32 stride) (f32vector points) (float thickness) (int num_segments))Implements al_calculate_spline.
[procedure] (calculate-ribbon (integer32 dest_stride) ((const f32vector) points) (integer32 points_stride) (float thickness) (integer32 num_segments))Implements al_calculate_ribbon.
Transformations
[procedure] (transform-use transform)Implements al_use_transform.
[procedure] (transform-copy! transform transform)Implements al_copy_transform.
[procedure] (transform-identity! transform)Implements al_identity_transform.
[procedure] (transform-build! transform (float x) (float y) (float sx) (float sy) (float theta))Implements al_build_transform.
[procedure] (transform-translate! transform (float x) (float y))Implements al_translate_transform.
[procedure] (transform-scale! transform (float sx) (float sy))Implements al_scale_transform.
[procedure] (transform-coordinates transform (float x) (float y))Implements al_transform_coordinates; returns a 2-element list of the transformed coordinate pair.
[procedure] (transform-compose! transform transform)Implements al_compose_transform.
[procedure] (transform-invert! transform)Implements al_invert_transform.
[procedure] (transform-check-inverse transform float)Implements al_check_inverse.
[procedure] (current-transform)Implements al_get_current_transform.
Events
Enums
event-type
[procedure] (event-type->int event-type)event-type may be one of the following symbols:
- joystick-axis
- joystick-button-down
- joystick-button-up
- joystick-configuration
- key-down
- key-char
- key-up
- mouse-axes
- mouse-button-down
- mouse-button-up
- mouse-enter-display
- mouse-leave-display
- mouse-warped
- timer
- display-expose
- display-resize
- display-close
- display-lost
- display-found
- display-switch-in
- display-switch-out
- display-orientation
- audio-stream-fragment
- audio-stream-finished
Records
any-event
[record] any-event[procedure] (any-event-type any-event)
[procedure] (any-event-source any-event)
[procedure] (any-event-timestamp any-event)
display-event
[record] display-event[procedure] (display-event-type display-event)
[procedure] (display-event-source display-event)
[procedure] (display-event-timestamp display-event)
[procedure] (display-event-x display-event)
[procedure] (display-event-y display-event)
[procedure] (display-event-width display-event)
[procedure] (display-event-height display-event)
[procedure] (display-event-orientation display-event)
event
[record] event[procedure] (make-event)
[procedure] (make-event*)
[procedure] (free-event! event)
event-source
[record] event-sourceevent-queue
[record] event-queuejoystick-event
[record] joystick-event[procedure] (joystick-event-type joystick-event)
[procedure] (joystick-event-source joystick-event)
[procedure] (joystick-event-timestamp joystick-event)
[procedure] (joystick-event-id joystick-event)
[procedure] (joystick-event-stick joystick-event)
[procedure] (joystick-event-axis joystick-event)
[procedure] (joystick-event-position joystick-event)
[procedure] (joystick-event-button joystick-event)
keyboard-event
[record] keyboard-event[procedure] (keyboard-event-type keyboard-event)
[procedure] (keyboard-event-source keyboard-event)
[procedure] (keyboard-event-timestamp keyboard-event)
[procedure] (keyboard-event-display keyboard-event)
[procedure] (keyboard-event-keycode keyboard-event)
[procedure] (keyboard-event-unichar keyboard-event)
[procedure] (keyboard-event-modifiers keyboard-event)
[procedure] (keyboard-event-repeat keyboard-event)
mouse-event
[record] mouse-event[procedure] (mouse-event-type mouse-event)
[procedure] (mouse-event-source mouse-event)
[procedure] (mouse-event-timestamp mouse-event)
[procedure] (mouse-event-display mouse-event)
[procedure] (mouse-event-x mouse-event)
[procedure] (mouse-event-y mouse-event)
[procedure] (mouse-event-z mouse-event)
[procedure] (mouse-event-w mouse-event)
[procedure] (mouse-event-dx mouse-event)
[procedure] (mouse-event-dy mouse-event)
[procedure] (mouse-event-dz mouse-event)
[procedure] (mouse-event-dw mouse-event)
[procedure] (mouse-event-button mouse-event)
[procedure] (mouse-event-pressure mouse-event)
timer-event
[record] timer-event[procedure] (timer-event-type timer-event)
[procedure] (timer-event-source timer-event)
[procedure] (timer-event-timestamp timer-event)
[procedure] (timer-event-count timer-event)
[procedure] (timer-event-error timer-event)
user-event
[record] user-event[procedure] (user-event-type user-event)
[procedure] (user-event-source user-event)
[procedure] (user-event-timestamp user-event)
[procedure] (user-event-data1 user-event)
[setter] (user-event-data1-set! user-event integer)
[procedure] (user-event-data2 user-event)
[setter] (user-event-data2-set! user-event integer)
[procedure] (user-event-data3 user-event)
[setter] (user-event-data3-set! user-event integer)
[procedure] (user-event-data4 user-event)
[setter] (user-event-data4-set! user-event integer)
Functions
[procedure] (user-event-type? integer)Implements ALLEGRO_EVENT_TYPE_IS_USER.
[procedure] (make-event-type (integer a) (integer b) (integer c) (integer d))Implements ALLEGRO_GET_EVENT_TYPE.
[procedure] (event-type event)Returns the type of a given event struct.
[procedure] (event->any-event event)Converts an event to an any-event.
[procedure] (event->display-event event)Converts an event to a display-event.
[procedure] (event->joystick-event event)Converts an event to a joystick-event.
[procedure] (event->keyboard-event event)Converts an event to a keyboard-event.
[procedure] (event->mouse-event event)Converts an event to a mouse-event.
[procedure] (event->timer-event event)Converts an event to a timer-event.
[procedure] (event->user-event event)Converts an event to a user-event.
[procedure] (user-event-source-init! event-source)Implements al_init_user_event_source.
[procedure] (free-user-event-source! event-source)Implements al_destroy_user_event_source.
[procedure] (emit-user-event! event-source event (function void (user-event)))Implements al_emit_user_event.
[procedure] (user-event-unref! user-event)Implements al_unref_user_event.
[procedure] (event-source-data event-source)Implements al_get_event_source_data.
[procedure] (event-source-data-set! event-source integer)Implements al_set_event_source_data.
[procedure] (make-event-queue*)Implements al_create_event_queue.
[procedure] (make-event-queue)Implements al_create_event_queue, with (free-event-queue!) declared as a finalizer.
[procedure] (free-event-queue! event-queue)Implements al_destroy_event_queue.
[procedure] (event-queue-register-source! event-queue event-source)Implements al_register_event_source.
[procedure] (event-queue-unregister-source! event-queue event-source)Implements al_unregister_event_source.
[procedure] (event-queue-empty? event-queue)Implements al_is_event_queue_empty.
[procedure] (event-queue-next! event-queue event)Implements al_get_next_event.
[procedure] (event-queue-peek! event-queue event)Implements al_peek_next_event.
[procedure] (event-queue-drop-next! event-queue)Implements al_drop_next_event_queue.
[procedure] (event-queue-flush! event-queue)Implements al_drop_next_event.
[procedure] (event-queue-wait! event-queue event)Implements al_wait_for_event.
[procedure] (event-queue-timed-wait! event-queue event float)Implements al_wait_for_event_timed.
[procedure] (event-queue-wait-until! event-queue event timeout)Implements al_wait_for_event_until.
Files
Constants
- eof
Enums
file-mode
[procedure] (file-mode->int file-mode)file-mode may be one of the following symbols:
- read
- write
- execute
- hidden
- file
- directory
seek-flag
[procedure] (seek-flag->int seek-flag)seek-flag may be one of the following symbols:
- set
- current
- end
Records
file
[record] filefile-interface
[record] file-interfacefs-entry
[record] fs-entry[procedure] (fs-entry-vtable fs-entry)
fs-interface
[record] fs-interface[procedure] (free-fs-interface! fs-interface)
[procedure] (fs-interface-create-entry fs-interface)
[procedure] (fs-interface-entry-name fs-interface)
[procedure] (fs-interface-update-entry fs-interface)
[procedure] (fs-interface-entry-mode fs-interface)
[procedure] (fs-interface-atime fs-interface)
[procedure] (fs-interface-mtime fs-interface)
[procedure] (fs-interface-ctime fs-interface)
[procedure] (fs-interface-entry-size fs-interface)
[procedure] (fs-interface-entry-exists? fs-interface)
[procedure] (fs-interface-remove-entry fs-interface)
[procedure] (fs-interface-open-directory fs-interface)
[procedure] (fs-interface-read-directory fs-interface)
[procedure] (fs-interface-close-directory fs-interface)
[procedure] (fs-interface-current-directory fs-interface)
[procedure] (fs-interface-make-directory fs-interface)
[procedure] (fs-interface-filename-exists? fs-interface)
[procedure] (fs-interface-remove-filename fs-interface)
[procedure] (fs-interface-open-file fs-interface)
path
[record] pathFunctions
File Operations
[procedure] (make-temp-file* (string template) ((c-pointer path) out_path))Implements al_make_temp_file.
[procedure] (make-temp-file (string template) ((c-pointer path) out_path))Implements al_make_temp_file, with (free&close-file!) declared as a finalizer.
[procedure] (file-open* (string path) (string mode))Implements al_fopen.
[procedure] (file-open (string path) (string mode))Implements al_fopen, with (free&close-file!) declared as a finalizer.
[procedure] (file-open-fd* (integer file-descriptor) (string mode))Implements al_fopen_fd.
[procedure] (file-open-fd (integer file-descriptor) (string mode))Implements al_fopen_fd, with (free&close-file!) declared as a finalizer.
[procedure] (free&close-file! file)Closes a file with (file-close!), then uses (free!) to clear the file struct from memory.
[procedure] (file-close! file)Implements al_fclose.
[procedure] (file-read! file blob (integer size))Implements al_fread.
[procedure] (file-write! file blob (integer size))Implements al_fwrite.
<procedure>(file-tell file)</procedure.
Implements al_ftell.
[procedure] (file-seek! file (integer offset) (integer whence))Implements al_fseek.
[procedure] (file-eof? file)Implements al_feof.
[procedure] (file-error? file)Implements al_ferror.
[procedure] (file-clear-error! file)Implements al_fclearerr.
[procedure] (file-unget-chars! file (integer count))Implements al_fungetc.
[procedure] (file-size file)Implements al_fsize.
[procedure] (file-get-char! file)Implements al_fgetc.
[procedure] (file-put-char! file (integer character))Implements al_fputc.
[procedure] (file-read-16le! file)Implements al_fread16le.
[procedure] (file-read-16be! file)Implements al_fread16be.
[procedure] (file-write-16le! file integer)Implements al_fwrite16le.
[procedure] (file-read-32le! file)Implements al_fread32le.
[procedure] (file-read-32be! file)Implements al_fread32be.
[procedure] (file-write-32le! file integer)Implements al_fwrite32le.
[procedure] (file-write-32be! file integer)Implements al_fwrite32be.
[procedure] (file-get-string! file blob (integer max))Implements al_fgets.
[procedure] (file-get-utf-string*! file)Implements al_get_ustr.
[procedure] (file-get-utf-string! file)Implements al_get_ustr, with (free-utf-string!) declared as a finalizer.
[procedure] (file-put-string! file string)Implements al_fputs.
[procedure] (file-userdata file)Implements al_get_file_userdata.
[procedure] (new-file-interface-set! file-interface)Implements al_set_new_file_interface.
[procedure] (file-interface-open* file-interface (string path) (string mode))Implements al_fopen_interface.
[procedure] (file-interface-open file-interface (string path) (string mode))Implements al_fopen_interface, with (free&close-file!) declared as a finalizer.
[procedure] (make-file-handle* file-interface (c-pointer userdata))Implements al_create_file_handle.
[procedure] (make-file-handle file-interface (c-pointer userdata))Implements al_create_file_handle, with (free&close-file!) decalred as a finalizer.
File System Hooks
[procedure] (make-fs-entry* string)Implements al_create_fs_entry.
[procedure] (make-fs-entry string)Implements al_create_fs_entry, with (free-fs-entry!) declared as a finalizer.
[procedure] (free-fs-entry! fs-entry)Implements al_destroy_fs_entry.
[procedure] (fs-entry-name fs-entry)Implements al_get_fs_entry_name.
[procedure] (fs-entry-update! fs-entry)Implements al_update_fs_entry.
[procedure] (fs-entry-mode fs-entry)Implements al_get_fs_entry_mode.
[procedure] (fs-entry-atime fs-entry)Implements al_get_fs_entry_atime.
[procedure] (fs-entry-mtime fs-entry)Implements al_get_fs_entry_mtime.
[procedure] (fs-entry-ctime fs-entry)Implements al_get_fs_entry_ctime.
[procedure] (fs-entry-size fs-entry)Implements al_get_fs_entry_size.
[procedure] (fs-entry-exists? fs-entry)Implements al_fs_entry_exists.
[procedure] (fs-entry-remove! fs-entry)Implements al_remove_fs_entry.
[procedure] (fs-entry-open fs-enty string)Implements al_open_fs_entry.
[procedure] (fs-entry-directory-open! fs-entry)Implements al_open_directory.
<procedure>(fs-entry-directory-read fs-entry)<procedure>
Implements al_read_directory.
[procedure] (fs-entry-directory-close! fs-entry)Implements al_close_directory.
[procedure] (current-directory)Implements al_get_current_directory.
[procedure] (change-directory string)Implements al_change_directory.
[procedure] (make-directory string)Implements al_make_directory.
[procedure] (filename-exists? string)Implements al_filename_exists.
[procedure] (filename-remove! string)Implements al_remove_filename.
[procedure] (new-file-interface)Implements al_get_new_file_interface.
[procedure] (current-fs-interface)Implements al_get_fs_interface.
[setter] (current-fs-interface-set!)Implements al_set_fs_interface.
[setter] (standard-fs-interface-set!)Implements al_set_standard_fs_interface.
Paths
[procedure] (make-path* string)Implements al_create_path.
<procedure>(make-path string)<procedure>
Implements al_create_path, with (free-path!) declared as a finalizer.
[procedure] (make-path-for-directory* string)Implements al_create_path_for_directory.
[procedure] (make-path-for-directory string)Implements al_create_path_for_directory, with (free-path!) declared as a finalizer.
[procedure] (free-path! path)Implements al_destroy_path.
[procedure] (path->string path (char separator))Implements al_path_cstr.
[procedure] (path-component-count path)Implements al_get_path_num_components.
[procedure] (path-component path integer)Implements al_get_path_compoenent.
[setter] (path-component-set! path integer string)Implements al_replace_path_component.
[procedure] (path-component-remove! path integer)Implements al_remove_path_component.
[procedure] (path-component-insert! path integer string)Implements al_insert_path_component.
[procedure] (path-clone path)Implements al_clone_path.
[procedure] (path-tail path)Implements al_get_path_tail.
[procedure] (path-drop-tail! path)Implements al_drop_path_tail.
[procedure] (path-append! path string)Implements al_append_path_component.
[procedure] (path-join! path path)Implements al_join_paths.
[procedure] (path-rebase! path path)Implements al_rebase_path.
[procedure] (path-drive path)Implements al_get_path_drive.
[setter] (path-drive-set! path string)Implements al_set_path_drive.
[procedure] (path-filename path)Implements al_get_path_filename.
[setter] (path-filename-set! path string)Implements al_set_path_filename.
[procedure] (path-extension path)Implements al_get_path_extension.
[setter] (path-extension-set! path string)Implements al_set_path_extension.
[procedure] (path-basename path)Implements al_get_path_basename.
[procedure] (path-make-canonical! path)Implements al_make_path_canonical.
PhysicsFS
See also: the physfs egg.
[procedure] (enable-physfs-file-interface)Implements al_set_physfs_file_interface.
[procedure] (physfs-addon-version)Implements al_get_allegro_physfs_version.
Fonts
Enums
font-align
[procedure] (font-align->int font-align)font-align may be one of the following symbols:
- left
- center
- right
Records
font
[record] font[procedure] (font-data font)
[procedure] (font-height font)
utf-string
[record] utf-stringFunctions
Fonts
[procedure] (register-font-loader (string extension) (function font (string integer integer)))Implements al_register_font_loader.
[procedure] (load-bitmap-font* string)Implements al_load_bitmap_font.
[procedure] (load-bitmap-font string)Implements al_load_bitmap_font, with (free-font!) declared as a finalizer.
[procedure] (load-font* string (integer size) (integer flags))Implements al_load_font.
[procedure] (load-font string (integer size) (integer flags))Implements al_load_font, with (free-font!) declared as a finalizer.
[procedure] (make-font-from-bitmap* bitmap (integer n) (s32vector ranges))Implements al_grab_font_from_bitmap.
[procedure] (make-font-from-bitmap bitmap (integer n) (s32vector ranges))Implements al_grab_font_from_bitmap, with (free-font!) declared as a finalizer.
[procedure] (free-font! font)Implements al_destroy_font.
[procedure] (font-draw-utf (font f) (color c) (float x) (float y) (font-align flags) (utf-string ustr))Implements al_draw_ustr.
[procedure] (font-draw-string (font f) (color c) (float x) (float y) (font-align flags) (string text))Implements al_draw_text.
[procedure] (font-draw-justified-string (font f) (color c) (float x1) (float x2) (float y) (float diff) (font-align flags) (c-string text))Implements al_draw_justified_text.
[procedure] (font-draw-justified-utf-string (font f) (color c) (float x1) (float x2) (float y) (float diff) (font-align flags) (utf-string text))Implements al_draw_justified_ustr.
[procedure] (font-width font string)Implements al_get_text_width.
[procedure] (font-utf-width font utf-string)Implements al_get_ustr_width.
[procedure] (font-line-height font)Implements al_get_font_line_height.
[procedure] (font-ascent font)Implements al_get_font_ascent.
[procedure] (font-descent font)Implements al_get_font_descent.
[procedure] (font-utf-dimensions (font f) (utf-string text))Returns a 4-element list consisting of the bounding box elements: x, y, width and height.
[procedure] (font-dimensions (font f) (string text))Returns a 4-element list consisting of the bounding box elements: x, y, width and height.
[procedure] (font-addon-install)Implements al_init_font_addon.
[procedure] (font-addon-uninstall)Implements al_shutdown_font_addon.
[procedure] (font-addon-version)Implements al_get_allegro_font_version.
True Type Font Support
[procedure] (load-ttf* (string filename) (integer size) (integer flags))Implements al_load_ttf_font.
[procedure] (load-ttf (string filename) (integer size) (integer flags))Implements al_load_ttf_font, with (free-font!) declared as a finalizer.
[procedure] (load-ttf-from-file* (file f) (string filename) (integer size) (integer flags))Implements al_load_ttf_font_f.
[procedure] (load-ttf-from-file (file f) (string filename) (integer size) (integer flags))Implements al_load_ttf_font_f, with (free-font!) declared as a finalizer.
[procedure] (ttf-addon-install)Implements al_init_ttf_addon.
[procedure] (ttf-addon-uninstall)Implements al_shutdown_ttf_addon.
[procedure] (ttf-addon-version)Implements al_get_allegro_ttf_version.
UTF Strings
[procedure] (make-utf-string* string)Implements al_ustr_new.
[procedure] (make-utf-string string)Implements al_ustr_new, with (free-utf-string!) declared as a finalizer.
[procedure] (make-utf-string-from-buffer* blob)Given a blob, produces a new utf-string.
[procedure] (make-utf-string-from-buffer blob)Given a blob, produces a new utf-string, with (free-utf-string!) declared as a finalizer.
[procedure] (free-utf-string! utf-string)Implements al_ustr_free.
[procedure] (utf->string utf-string)Implements al_cstr.
[procedure] (utf->buffer! utf-string blob)Implements al_ustr_to_buffer.
[procedure] (utf->string-copy utf-string)Implements al_cstr_dup.
[procedure] (utf-copy* utf-string)Implements al_ustr_dup.
[procedure] (utf-copy utf-string)Implements al_ustr_dup, with (free-utf-string!) declared as a finalizer.
[procedure] (utf-substring* utf-string (integer start) (integer end))Implements al_ustr_dup_substr.
[procedure] (utf-substring utf-string (integer start) (integer end))Implements al_ustr_dup_substr, with (free-utf-string!) declared as a finalizer.
[procedure] (utf-empty-string)Implements al_ustr_empty_string.
[procedure] (make-utf-null-string*)Makes an empty utf-string struct, where the string pointer is unset.
[procedure] (make-utf-null-string)Makes an empty utf-string struct, where the string pointer is unset, with (free-utf-string!) declared as a finalizer.
[procedure] (utf-reference-cstr* string)Implements al_ref_cstr.
[procedure] (utf-reference-cstr string)Implements al_ref_cstr, with (free-utf-string!) declared as a finalizer.
[procedure] (utf-reference-buffer* blob)Implements al_ref_buffer.
[procedure] (utf-reference-buffer blob)Implements al_ref_buffer, with (free-utf-string!) declared as a finalizer.
[procedure] (utf-reference-utf-string* utf-string (integer start) (integer end))Implements al_ref_ustr.
[procedure] (utf-reference-utf-string utf-string (integer start) (integer end))Implements al_ref_ustr, with (free-utf-string!) declared as a finalizer.
[procedure] (utf-size utf-string)Implements al_ustr_size.
[procedure] (utf-length utf-string)Implements al_ustr_length.
[procedure] (utf-offset utf-string integer)Implements al_ustr_offset.
[procedure] (utf-next utf-string integer)Implements al_ustr_next, modified to return #f at the end of the string.
[procedure] (utf-previous utf-string integer)Implements al_ustr_prev, modified to return #f at the end of the string.
[procedure] (utf-get utf-string integer)Implements al_ustr_get.
[procedure] (utf-get-next utf-string integer)Returns a 2-element list consisting of the next code and its position, or #f if at the end of the string.
[procedure] (utf-get-prev utf-string integer)Returns a 2-element list consisting of the previous code and its position, or #f if at the start of the string.
[procedure] (utf-remove-char! utf-string integer)Implements al_ustr_remove_chr.
[procedure] (utf-remove-range! utf-string (integer start) (integer end))Implements al_ustr_remove_range.
[procedure] (utf-truncate! utf-string integer)Implements al_ustr_truncate.
[procedure] (utf-ltrim! utf-string)Implements al_ustr_ltrim_ws.
[procedure] (utf-rtrim! utf-string)Implements al_ustr_rtrim_ws.
[procedure] (utf-trim! utf-string)Implements al_ustr_trim_ws.
[procedure] (utf-assign! utf-string utf-string)Implements al_ustr_assign.
[procedure] (utf-assign-substring! utf-string utf-string (integer start) (integer end))Implements al_ustr_assign_substr.
[procedure] (utf-assign-string! utf-string string)Implements al_ustr_assign_cstr.
[procedure] (utf-set-char! utf-string (integer pos) (integer char))Implements al_ustr_set_chr.
[procedure] (utf-replace-range! utf-string (integer start) (integer end) utf-string)Implements al_ustr_replace_range.
[procedure] (utf-find utf-string (integer start) utf-string)Implements al_ustr_find_str.
[procedure] (utf-find-string utf-string (integer start) string)Implements al_ustr_find_cstr.
[procedure] (utf-find-char utf-string (integer start) (integer char))Implements al_ustr_find_chr.
[procedure] (utf-find-set utf-string (integer start) utf-string)Implements al_ustr_find_set.
[procedure] (utf-find-set-string utf-string integer string)Implements al_ustr_find_set_cstr.
[procedure] (utf-find-cset utf-string integer utf-string)Implements al_ustr_find_cset.
[procedure] (utf-find-cset-string utf-string integer string)Implements al_ustr_find_set_cstr.
[procedure] (utf-rfind utf-string integer utf-string)Implements al_ustr_rfind_str.
[procedure] (utf-rfind-char utf-string integer (integer char))Implements al_ustr_rfind_char.
[procedure] (utf-rfind-string utf-string integer string)Implements al_ustr_rfind_cstr.
[procedure] (utf-find&replace! utf-string integer utf-string utf-string)Implements al_ustr_find_replace.
[procedure] (utf-find&replace-string! utf-string integer string string)Implements al_ustr_find_replace_cstr.
[procedure] (utf-equal? utf-string utf-string)Implements al_ustr_equal.
[procedure] (utf-compare utf-string utf-string)Implements al_ustr_compare.
[procedure] (utf-ncompare utf-string utf-string integer)Implements al_ustr_ncompare.
[procedure] (utf-prefix? utf-string utf-string)Implements al_ustr_has_prefix.
[procedure] (utf-prefix-string? utf-string string)Implements al_ustr_has_prefix_cstr.
[procedure] (utf-suffix? utf-string utf-string)Implements al_ustr_has_prefix.
[procedure] (utf-suffix-string? utf-string string)Implements al_ustr_has_suffix_cstr.
[procedure] (utf8-width integer32)Implements al_utf8_width.
[procedure] (utf8-encode! blob integer32)Implements al_utf8_encode.
[procedure] (utf-string-utf16-size utf-string)Implements al_ustr_size_utf16.
[procedure] (utf-string-utf16-encode utf-string blob integer)Implements al_ustr_encode_utf16.
[procedure] (utf16-width integer)Implements al_utf16_width.
[procedure] (utf16-encode u16vector integer32)Implements al_utf16_encode.
Input
Constants
- joystick-max-axes
- jostick-max-sticks
- joystick-max-buttons
- mouse-max-extra-axis
Enums
cursor-type
[procedure] (cursor-type->int cursor-type)cursor-type may be one of the following symbols:
- none
- default
- arrow
- busy
- question
- edit
- move
- resize-north
- resize-west
- resize-south
- resize-east
- resize-northwest
- resize-southwest
- resize-southeast
- resize-northeast
- progress
- precision
- link
- alt-select
- unavailable
joystick-flag
[procedure] (joystick-flag->int joystick-flag)joystick-flag may be one of the following symbols:
- digital
- analog
key
[procedure] (key->int key)key may be one of the following symbols:
- a
- b
- c
- d
- e
- f
- g
- h
- i
- j
- k
- l
- m
- n
- o
- p
- q
- r
- s
- t
- u
- v
- w
- x
- y
- z
- one
- two
- three
- four
- five
- six
- seven
- eight
- nine
- zero
- pad-one
- pad-two
- pad-three
- pad-four
- pad-five
- pad-six
- pad-seven
- pad-eight
- pad-nine
- pad-zerp
- f1
- f2
- f3
- f4
- f5
- f6
- f7
- f9
- f9
- f10
- f11
- f12
- escape
- tilde
- minus
- equals
- backspace
- tab
- openbrace
- enter
- semicolon
- quote
- backslash
- backslash2
- comma
- fullstop
- slash
- space
- insert
- delete
- home
- end
- pgup
- pgdn
- left
- right
- up
- down
- pad-slash
- pad-asterisk
- pad-minus
- pad-plus
- pad-delete
- pad-enter
- printscreen
- pause
- abnt-c1
- yen
- kana
- convert
- noconvert
- at
- circumflex
- colon2
- kanji
- pad-equals
- backquote
- semicolon2
- command
- unknown
- lshift
- rshift
- lctrl
- rctrl
- alt
- altgr
- lwin
- rwin
- menu
- scrolllock
- numlock
- capslock
keymod
[procedure] (keymod->int keymod)keymod may be one of the following symbols:
- shift
- ctrl
- alt
- lwin
- rwin
- menu
- altgr
- command
- scrolllock
- numlock
- capslock
- inaltseq
- accent1
- accent2
- accent3
- accent4
Records
cursor
[record] cursorjoystick
[record] joystickjoystick-state
[record] joystick-state[procedure] (make-joystick-state*)
[procedure] (make-joystick-state)
[procedure] (free-joystick-state! joystick-state)
[procedure] (joystick-state-button int)
keyboard
[record] keyboardkeyboard-state
[record] keyboard-state[procedure] (make-keyboard-state*)
[procedure] (make-keyboard-state)
[procedure] (free-keyboard-state! keyboard-state)
[procedure] (keyboard-state-display)
mouse
[record] mousemouse-cursor
[record] mouse-cursormouse-state
[record] mouse-state[procedure] (make-mouse-state)
[procedure] (make-mouse-state*)
[procedure] (free-mouse-state! mouse-state)
[procedure] (mouse-state-x mouse-state)
[procedure] (mouse-state-y mouse-state)
[procedure] (mouse-state-z mouse-state)
[procedure] (mouse-state-w mouse-state)
[procedure] (mouse-state-buttons mouse-state)
[procedure] (mouse-state-pressure mouse-state)
[procedure] (mouse-state-axis mouse-state integer)
[procedure] (mouse-state-display mouse-state)
Functions
Joystick
[procedure] (joystick-addon-install)Implements al_install_joystick.
[procedure] (joystick-addon-uninstall)Implements al_uninstall_joystick.
<procedure>(joystick-addon-installed?)<procedure>
Implements al_is_joystick_installed.
[procedure] (joystick-addon-reconfigure)Implements al_reconfigure_joysticks.
<procedure>(joystick-event-source)<procedure>
Implements al_get_joystick_event_source.
[procedure] (joystick-count)Implements al_get_num_joysticks.
[procedure] (joystick-ref integer)Implements al_get_joystick.
[procedure] (joystick-release joystick)Implements al_release_joystick.
[procedure] (joystick-active? joystick)Implements al_get_joystick_active.
[procedure] (joystick-name joystick)Implements al_get_joystick_name.
[procedure] (joystick-axes-count joystick (integer stick))Implements al_get_joystick_num_axes.
[procedure] (joystick-button-count joystick)Implements al_get_joystick_num_buttons.
[procedure] (joystick-button-name joystick (integer button))Implements al_get_joystick_button_name.
[procedure] (joystick-state-init! joystick-state joystick)Implements al_get_joystick_state.
[procedure] (joystick-state-axis joystick-state (integer stick) (integer axis))Retrieves desired axis value for a particular stick; #f if either stick or axis is out of available bounds.
Keyboard
[procedure] (keyboard-addon-installed?)Implements al_is_keyboard_installed.
[procedure] (keyboard-addon-install)Implements al_install_keyboard.
[procedure] (keyboard-addon-uninstall)Implements al_uninstall_keyboard.
[procedure] (keycode->string key)Implements al_keycode_to_name. Not strictly necessary, since the enums are symbols which can easily be converted to strings.
[procedure] (keyboard-event-source)Implements al_get_keyboard_event_source.
[procedure] (keyboard-led-set! integer)Implements al_set_keyboard_leds.
[procedure] (keyboard-state-init! keyboard-state)Implements al_get_keyboard_state.
[procedure] (keyboard-state-key-down? keyboard-state key)Implements al_key_down.
[procedure] (keyboard-three-finger-flag?)Wraps _al_three_finger_flag.
[procedure] (keyboard-led-flag?)Wraps _al_key_led_flag.
Mouse
[procedure] (mouse-addon-installed?)Implements al_is_mouse_installed.
[procedure] (mouse-addon-install)Implements al_install_mouse.
[procedure] (mouse-addon-uninstall)Implements al_uninstall_mouse.
[procedure] (mouse-button-count)Implements al_get_mouse_num_buttons.
[procedure] (mouse-axes-count)Implements al_get_mouse_num_axes.
[procedure] (mouse-xy-set! display (integer x) (integer y))Implements al_set_mouse_xy.
[procedure] (mouse-z-set! display integer)Implements al_set_mouse_z.
[procedure] (mouse-w-set! display integer)Implements al_set_mouse_w.
[procedure] (mouse-event-source)Implements al_get_mouse_event_source.
<procedure>(mouse-state-init! mouse-state)</procedure.
Implements al_get_mouse_state.
[procedure] (mouse-state-button-down mouse-state (integer button))Implements al_mouse_button_down.
[procedure] (mouse-state-axis mouse-state (integer axis))Implements al_get_mouse_state_axis.
[procedure] (mouse-axis-set! (integer axis) (integer value))Implements al_set_mouse_axis.
[procedure] (make-cursor* (bitmap sprite) (integer xfocus) (integer yfocus))Implements al_create_mouse_cursor.
[procedure] (make-cursor (bitmap sprite) (integer xfocus) (integer yfocus))Implements al_create_mouse_cursor, with (free-cursor!) declared as a finalizer.
[procedure] (free-cursor! cursor)Implements al_destroy_mouse_cursor.
[procedure] (mouse-cursor-position)Returns a 2-element list consisting of the x and y position of the mouse cursor.
[procedure] (mouse-ungrab)Implements al_ungrab_mouse.
[procedure] (display-grab-mouse! display)Implements al_grab_mouse.
[procedure] (display-cursor-set! display mouse-cursor)Implements al_set_mouse_cursor.
[procedure] (display-hide-cursor! display)Implements al_hide_mouse_cursor.
[procedure] (display-system-mouse-cursor-set! display cursor-type)Implements al_set_system_mouse_cursor.
Math
Functions
Fixed Math
[procedure] (fix-to-rad integer)Implements al_fixtorad_r.
[procedure] (rad-to-fix integer)Implements al_radtofix_r.
[procedure] (fixed-sqrt integer)Implements al_fixsqrt.
[procedure] (fixed-hypot integer)Implements al_fixhypot.
[procedure] (fixed-atan integer)Implements al_fixatan.
[procedure] (fixed-atan2 integer)Implements al_fixatan2.
[procedure] (fixed-cos integer)Wraps _al_fix_cos_tbl.
[procedure] (fixed-tan integer)Wraps _al_fix_tan_tbl.
[procedure] (fixed-acos integer)Wraps _al_fix_acos_tbl.
Memory
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))
System
Constants
- build-version
- pi
Enums
state-flag
[procedure] (state-flag->int state-flag)state-flag may be one of the following symbols:
- new-display-parameters
- new-bitmap-parameters
- display
- target-bitmap
- blender
- new-file-interface
- transform
- bitmap
- all
system-path
[procedure] (system-path->int system-path)system-path may be one of the following symbols:
- resources-path
- temp-path
- user-data-path
- user-home-path
- user-settings-path
- user-documents-path
- exename-path
- last-path
Records
condition
[record] conditiondriver
[record] driver[procedure] (free-driver!)
[procedure] (driver-id driver)
[procedure] (driver-ptr driver)
[procedure] (driver-autodetect driver)
mutex
[record] mutexstate
[record] state[procedure] (make-state*)
[procedure] (make-state)
[procedure] (free-state! state)
system
[record] systemthread
[record] threadtimer
[record] timertimeout
[record] timeout[procedure] (make-timeout*)
[procedure] (make-timeout)
[procedure] (free-timeout! timeout)
version
[record] version[procedure] (version-major version)
[procedure] (version-sub version)
[procedure] (version-wip version)
[procedure] (version-release-number version)
[procedure] (version-string version)
[procedure] (version-date-string version)
[procedure] (version-date version)
[procedure] (version-int version)
Functions
System
[procedure] (init)Implements al_init.
[procedure] (inhibit-screensaver bool)Implements al_inhibit_screensaver.
[procedure] (org-name)Implements al_get_org_name.
[setter] (org-name-set! string)Implements al_set_org_name.
[procedure] (app-name)Implements al_get_app_name.
<setter>(app-name-set! string)</procedure>
Implements al_set_app_name.
[procedure] (system-addon-uninstall)Implements al_uninstall_system.
[procedure] (system-addon-installed?)Implements al_is_system_installed.
[procedure] (system-driver)Implements al_get_system_driver.
[procedure] (system-config)Implements al_get_system_config.
[procedure] (standard-path system-path)Implements al_get_standard_path.
Threads
WARNING: Untested, may not interact well with Chicken.
Please, please tell me about your successes and workarounds. I'll fix the egg as called for.
[procedure] (make-thread* (function c-pointer (thread c-pointer)) c-pointer)Implements al_create_thread.
[procedure] (make-thread (function c-pointer (thread c-pointer)) c-pointer)Implements al_create_thread, with (free-thread!) declared as a finalizer.
[procedure] (free-thread! thread)Implements al_destroy_thread.
<proceudre>(run-detached-thread (function c-pointer (c-pointer)) c-pointer)</procedure>
Implements al_run_detached_thread.
[procedure] (thread-start! thread)Implements al_start_thread.
[procedure] (thread-join! thread ((c-pointer c-pointer) ret_value))Implements al_join_thread.
[procedure] (thread-should-stop? thread)Implements al_get_thread_should_stop.
[setter] (thread-should-stop-set! thread)Implements al_set_thread_should_stop.
[procedure] (make-mutex*)Implements al_create_mutex.
[procedure] (make-mutex)Implements al_create_mutex, with (free-mutex!) declared as a finalizer.
[procedure] (free-mutex! mutex)Implements al_destroy_mutex.
[procedure] (make-mutex-recursive*)Implements al_create_mutex_recursive.
[procedure] (make-mutex-recursive)Implements al_create_mutex_recursive, with (free-mutex!) declared as a finalizer.
[procedure] (mutex-lock! mutex)Implements al_lock_mutex.
[procedure] (mutex-unlock! mutex)Implements al_unlock_mutex.
[procedure] (make-condition*)Implements al_create_cond.
[procedure] (make-condition)Implements al_create_cond, with (free-condition!) declared as a finalizer.
[procedure] (free-condition! condition)Implements al_destroy_cond.
[procedure] (condition-wait condition mutex)Implements al_wait_cond.
[procedure] (condition-wait-until condition mutex timeout)Implements al_wait_cond_until.
[procedure] (condition-broadcast condition)Implements al_broadcast_cond.
[procedure] (condition-signal condition)Implements al_signal_cond.
Thread Local Storage
[procedure] (state-store! state state-flag)Implements al_store_state.
[procedure] (state-restore state)Implements al_restore_state.
Time
[procedure] (current-time)Implements al_get_time.
[procedure] (rest double)Implements al_rest.
[procedure] (timeout-init! timeout double)Implements al_init_timeout.
Timer
[procedure] (make-timer* double)Implements al_create_timer.
[procedure] (make-timer double)Implements al_create_timer, with (free-timer!) declared as a finalizer.
[procedure] (free-timer! timer)Implements al_destroy_timer.
[procedure] (usec->sec double)Implements ALLEGRO_USECS_TO_SECS.
[procedure] (msec->sec double)Implements ALLEGRO_MSECS_TO_SECS.
[procedure] (bps->sec double)Implements ALLEGRO_BPS_TO_SECS.
[procedure] (bpm->sec double)Implements ALLEGRO_BPM_TO_SECS.
[procedure] (timer-start! timer)Implements al_start_timer.
[procedure] (timer-stop! timer)Implements al_stop_timer.
[procedure] (timer-started? timer)Implements al_get_timer_started.
[procedure] (timer-speed timer)Implements al_get_timer_speed.
<setter>(timer-speed-set! timer double)</procedure>
Implements al_set_timer_speed.
[procedure] (timer-count timer)Implements al_get_timer_count.
<setter>(timer-count-set! timer integer)</procedure>
Implements al_set_timer_count.
[procedure] (timer-count-add! timer integer)Implements al_add_timer_count.
[procedure] (timer-source timer)Implements al_get_timer_event_source.
C Utilities
Found in the allegro-c-util module.
(make-c-string-list obj)
The obj parameter can either be a single string or list of strings. Returns a managed pointer to a NULL-terminated (char **) list suitable for use with GL extension methods.
OpenGL
As of 4.0.0 the Allegro egg provides OpenGL and GL extension bindings itself.
License
Copyright 2012-2019 Daniel J. Leslie. All rights reserved. . Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. . THIS SOFTWARE IS PROVIDED BY DANIEL J. LESLIE ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DANIEL J. LESLIE OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. . The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of Daniel J. Leslie.