allegro
Allegro 5.0 bindings for Chicken.
TOC »
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
- audio-depth->int audio-depthprocedure
{audio-depth may be one of the following symbols:
- int8
- int16
- int24
- float32
- unsigned
- uint8
- uint16
- uint24
- int->audio-depth integerprocedure
channel-configuration
- channel-configuration->int channel-configurationprocedure
channel-configuration may be one of the following symbols:
- one
- two
- three
- four
- five-one
- six-one
- seven-one
- int->channel-configuration integerprocedure
mixer-quality
- mixer-quality->int mixer-qualityprocedure
mixer-quality may be one of the following symbols:
- point
- linear
- int->mixer-quality integerprocedure
playmode
- playmode->int playmodeprocedure
playmode may be one of the following symbols:
- once
- loop
- bidirectional
- int->playmode integerprocedure
Records
audio-stream
- audio-streamrecord
mixer
- mixerrecord
sample
- samplerecord
sample-id
- sample-idrecord
sample-instance
- sample-instancerecord
voice
- voicerecord
Functions
Audio
- (make-sample* (blob buffer) (unsigned-integer samples) (unsigned-integer frequency) audio-depth channel-configuration (bool free-buffer))procedure
Implements al_create_sample.
- (make-sample (blob buffer) (unsigned-integer samples) (unsigned-integer frequency) audio-depth channel-configuration (bool free-buffer))procedure
Implements al_create_sample, with (free-sample!) declared as a finalizer.
- free-sample! sampleprocedure
Implements al_destroy_sample.
- make-sample-instance* sampleprocedure
Implements al_create_sample_instance.
- make-sample-instance sampleprocedure
Implements al_create_sample_instance, with (free-sample-instance!) declared as a finalizer.
- free-sample-instance! sampleprocedure
Implements al_destroy_sample_instance.
- sample-frequency sampleprocedure
Implements al_get_sample_frequenecy.
- sample-length sampleprocedure
Implements al_get_sample_length.
- sample-depth sampleprocedure
Implements al_get_sample_depth.
- sample-channels sampleprocedure
Implements al_get_sample_channels.
- sample-instance-frequency sample-instanceprocedure
Implements al_get_sample_instance_frequency.
- sample-instance-length sample-instanceprocedure
Implements al_get_sample_instance_length.
- sample-instance-position sample-instanceprocedure
Implements al_get_sample_instance-position.
- sample-instance-speed sample-instanceprocedure
Implements al_get_sample_instance_speed.
- sample-instance-gain sample-instanceprocedure
Implements al_get_sample_instance_gain.
- sample-instance-pan sample-instanceprocedure
Implements al_get_sample_instance_pan.
- sample-instance-time sample-instanceprocedure
Implements al_get_sample_instance_time.
- sample-instance-depth sample-instanceprocedure
Implements al_get_sample_instance_depth.
- sample-instance-channels sample-instanceprocedure
Implements al_get_sample_instance_channels.
- sample-instance-playmode sample-instanceprocedure
Implements al_get_sample_instance_playmode.
- sample-instance-playing? sample-instanceprocedure
Implements al_get_sample_instance_playing.
- sample-instance-attached? sample-instanceprocedure
Implements al_get_sample_instance_attached.
- sample-instance-position-set! sample-instance unsigned-integerprocedure
Implements al_set_sample_instance_position.
- sample-instance-length-set! sample-instance unsigned-integerprocedure
Implements al_set_sample_instance_length.
- sample-instance-speed-set! sample-instance floatprocedure
Implements al_set_sample_instance_speed.
- sample-instance-gain-set! sample-instance floatprocedure
Implements al_set_sample_instance_gain.
- sample-instance-pan-set! sample-instance floatprocedure
Implements al_set_sample_instance_pan.
- sample-instance-playmode-set! sample-instance playmodeprocedure
Implements al_set_sample_instance_playmode.
- sample-instance-playing-set! sample-instance boolprocedure
Implements al_set_sample_instance_playing.
- sample-instance-detach! sample-instanceprocedure
Implements al_detach_sample_instance.
- sample-instance-sample sample-instanceprocedure
Implements al_get_sample.
- sample-instance-sample-set! sample-instance sampleprocedure
Implements al_set_sample
- sample-instance-play sample-instanceprocedure
Implements al_play_sample_instance.
- sample-instance-stop sample-instanceprocedure
Implements al_stop_sample_instance.
- (make-audio-stream* (integer buffer-count) (unsigned-integer samples) (unsigned-integer frequency) audio-depth channel-configuration)procedure
Implements al_create_audio_stream.
- (make-audio-stream (integer buffer-count) (unsigned-integer samples) (unsigned-integer frequency) audio-depth channel-configuration)procedure
Implements al_create_audio_stream, with (free-audio-stream!) declared as a finalizer.
- free-audio-stream! audio-streamprocedure
Implements al_destroy_audio_stream.
- audio-stram-drain audio-streamprocedure
Implements al_drain_audio_stream.
- audio-stream-frequency audio-streamprocedure
Implements al_get_audio_stream_frequency.
- audio-stream-length audio-streamprocedure
Implements al_get_audio_stream_length.
- audio-stream-fragments audio-streamprocedure
Implements al_get_available_audio_stream_fragments.
- audio-stream-available-fragments audio-streamprocedure
Implements al_get_available_audio_stream_fragments.
- audio-stream-speed audio-streamprocedure
Implements al_get_audio_stream_speed.
- audio-stream-gain audio-streamprocedure
Implements al_get_audio_stream_gain.
- audio-stream-channels audio-streamprocedure
Implements al_get_audio_stream_channels.
- audio-stream-depth audio-streamprocedure
Implements al_get_audio_stream_depth.
- audio-stream-playmode audio-streamprocedure
Implements al_get_audio_stream_playmode.
- audio-stream-playing? audio-streamprocedure
Implements al_get_audio_stream_playing.
- audio-stream-attached? audio-streamprocedure
Implements al_get_audio_stream_attached.
- audio-stream-fragment audio-streamprocedure
Implements al_get_audio_stream_fragment.
- audio-stream-speed-set! audio-stream floatprocedure
Implements al_set_audio_stream_speed.
- audio-stream-gain-set! audio-stream floatprocedure
Implements al_set_audio_stream_gain.
- audio-stream-pan-set! audio-stream floatprocedure
Implements al_set_audio_stream_pan.
- audio-stream-playmode-set! audio-stream playmodeprocedure
Implements al_set_audio_stream_playmode.
- audio-stream-playing-set! audio-stream boolprocedure
Implements al_set_audio_stream_playing.
- audio-stream-detach! audio-streamprocedure
Implements al_detach_audio_stream.
- audio-stream-fragment-set! audio-stream c-pointerprocedure
Implements al_set_audio_stream_fragment.
- audio-stream-rewind! audio-streamprocedure
Implements al_rewind_audio_stream.
- audio-stream-seek-seconds! audio-stream doubleprocedure
Implements al_seek_audio_stream_secs.
- audio-stream-position-seconds audio-streamprocedure
Impements al_get_audio_stream_position_secs.
- audio-stream-length-seconds audio-streamprocedure
Implements al_get_audio_length_secs.
- (audio-stream-loop-set! audio-stream (double start-seconds) (double end-seconds))procedure
Implements al_set_audio_stream_loop_secs.
- audio-stream-event-source audio-streamprocedure
Implements al_get_audio_stream_event_source.
- (make-mixer* (unsigned-integer frequency) audio-depth channel-configuration)procedure
Implements al_create_mixer.
- (make-mixer (unsigned-integer frequency) audio-depth channel-configuration)procedure
Implements al_create_mixer, with (free-mixer!) declared as a finalizer.
- free-mixer! mixerprocedure
Implements al_destroy_mixer.
- sample-instance-attach-to-mixer! sample-instance mixerprocedure
Implements al_attach_sample_instance_to_mixer.
- audio-stream-attach-to-mixer! audio-stream mixerprocedure
Implements al_attach_audio_stram_to_mixer.
- mixer-attach-to-mixer! mixer mixerprocedure
Implements al_attach_mixer_to_mixer.
- (mixer-postprocess-callback-set! mixer (function void (c-pointer unsigned-integer32 c-pointer)) (c-pointer data))procedure
Implements al_set_mixer_postprocess_callback.
- mixer-frequency mixerprocedure
Implements al_get_mixer_frequency.
- mixer-channels mixerprocedure
Implements al_get_mixer_channels.
- mixer-depth mixerprocedure
Implements al_get_mixer_depth.
- mixer-quality mixerprocedure
Implements al_get_mixer_quality.
- mixer-playing? mixerprocedure
Implements al_get_mixer_playing.
- mixer-attached? mixerprocedure
Implements al_get_mixer_attached.
- mixer-frequency-set! mixer unsigned-integerprocedure
Implements al_set_mixer_frequency.
- mixer-quality-set! mixer mixer-qualityprocedure
Implements al_set_mixer_quality.
- mixer-playing-set! mixer boolprocedure
Implements al_set_mixer_playing.
- mixer-detach! mixerprocedure
Implements al_detach_mixer.
- (make-voice* (unsigned-integer frequency) audio-depth channel-configuration)procedure
Implements al_create_voice.
- (make-voice (unsigned-integer frequency) audio-depth channel-configuration)procedure
Implements al_create_voice, with (free-voice!) declared as a finalizer.
- free-voice! voiceprocedure
Implements al_destroy_voice.
- sample-instance-attach-to-voice! sample-instance voiceprocedure
Implements al_attach_sample_instance_to_voice.
- audio-stream-attach-to-voice! audio-stram voiceprocedure
Implements al_attach_audio_stream_to_voice.
- mixer-attach-to-voice! mixer voiceprocedure
Implements al_attach_mixer_to_voice.
- voice-detach! voiceprocedure
Implements al_detach_voice.
- voice-frequency voiceprocedure
Implements al_get_voice_frequency.
- voice-position voiceprocedure
Implements al_get_voice_position voice)</procedure>
- voice-channels voiceprocedure
Implements al_get_voice_channels.
- voice-depth voiceprocedure
Implements al_get_voice_depth.
- voice-playing? voiceprocedure
Implements al_get_voice_playing.
- voice-position-set! voice unsigned-integerprocedure
Implements al_set_voice_position.
- voice-playing-set! voice boolprocedure
Implements al_set_voice_playing.
- audio-addon-installprocedure
Implements al_install_audio.
- audio-addon-uninstallprocedure
Implements al_uninstall_audio.
- audio-addon-installed?procedure
Implements al_is_audio_installed.
- audio-addon-versionprocedure
Implements al_get_allegro_audio_version.
- channel-configuration-count channel-configurationprocedure
Implements al_get_channel_count.
- audio-depth-size audio-depthprocedure
Implements al_get_audio_depth_size.
- default-mixerprocedure
Implements al_get_default_mixer.
- default-mixer-set! mixerprocedure
Implements al_set_default_mixer.
- default-mixer-restore!procedure
Implements al_restore_default_mixer.
- (sample-play sample (float gain) (float pan) (float speed) playmode sample-id)procedure
Implements al_play_sample.
The Sample ID is written to the provided sample-id struct.
- sample-stop sample-idprocedure
Implements al_stop_sample.
- reserve-samples integerprocedure
Implements al_reserve_samples.
- stop-all-samplesprocedure
Implements al_stop_samples.
- (register-sample-loader (string extension) (function sample ((const string))))procedure
Implements al_register_sample_loader.
- (register-sample-saver (string extension) (function bool ((const c-string) sample)))procedure
Implements al_register_sample_saver.
- (register-audio-stream-loader (string extension) (function audio-stream ((const string) size_t unsigned-integer32)))procedure
Implements al_register_audio_stream_loader.
- (register-sample-file-loader (string extension) (function sample (file)))procedure
Implements al_register_sample_loader_f.
- (register-sample-file-saver (string extension) (function bool (file sample)))procedure
Implements al_register_sample_saver_f.
- (register-audio-stream-file-loader (string extension) (function audio-stream (file size_t unsigned-integer)))procedure
Implements al_register_audio_stream_loader_f.
- load-sample* stringprocedure
Implements al_load_sample.
- load-sample stringprocedure
Implements al_load_sample, with (free-sample!) declared as a finalizer.
- (load-audio-stream* string (integer buffer-count) (unsigned-integer samples))procedure
Implements al_load_audio_stream.
- (load-audio-stream string (integer buffer-count) (unsigned-integer samples))procedure
Implements al_load_audio_stream, with (free-audio-stream!) declared as a finalizer.
- (load-audio-stream-from-file* file (string identity) (integer buffer-count) (unsigned-integer samples))procedure
Implements al_load_audio_straem_from_file.
- (load-audio-stream-from-file file (string identity) (integer buffer-count) (unsigned-integer samples))procedure
Implements al_load_audio_straem_from_file, with (free-audio-stream!) declared as a finalizer.
- (load-sample-from-file* file (string identity))procedure
Implements al_load_sample_f.
- (load-sample-from-file file (string identity))procedure
Implements al_load_sample_f, with (free-sample!) declared as a finalizer.
- (sample-save-to-file sample file (string identity))procedure
Implements al_save_sample_f.
- (sample-save sample (string filename))procedure
Implements al_save_sample.
Audio Codec Addon
- acodec-addon-initprocedure
Implements al_init_acodec_addon.
- acodec-addon-versionprocedure
Implements al_get_allegro_acodec_version.
Bitmaps
Enums
bitmap-flag
- bitmap-flag->int bitmap-flagprocedure
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
- int->bitmap-flag integerprocedure
blend-operation
- blend-operation->int blend-operationprocedure
blend-operation may be one of the following symbols:
- add
- source-minus-destination
- destination-minus-source
- int->blend-operation integerprocedure
blending-mode
- blending-mode->int blending-modeprocedure
blending-mode may be one of the following symbols:
- zero
- one
- alpha
- inverse-alpha
- int->blending-mode integerprocedure
blitting-flag
- blitting-flag->int blitting-flagprocedure
blitting-flag may be one of the following symbols:
- flip-horizontal
- flip-vertical
- int->blitting-flag integerprocedure
locking-flag
- locking-flag->int locking-flagprocedure
locking-flag may be one of the following symbols:
- read-write
- read-only
- write-only
- int->locking-flag integerprocedure
pixel-format
- pixel-format->int pixel-formatprocedure
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
- int->pixel-format integerprocedure
Records
bitmap
- bitmaprecord
locked-region
- locked-regionrecord
- free-locked-region! locked-regionprocedure
- locked-region-data locked-regionprocedure
- locked-region-format locked-regionprocedure
- locked-region-pitch locked-regionprocedure
- locked-region-pixel-size locked-regionprocedure
Functions
Bitmap
- new-bitmap-format-set! pixel-formatprocedure
Implements al_set_new_bitmap_format.
- new-bitmap-formatprocedure
Implements al_get_new_bitmap_flags.
- new-bitmap-flags-set! bitmap-flagprocedure
Implements al_set_new_bitmap_flags.
- new-bitmap-flagsprocedure
Implements al_get_new_bitmap_flags.
- new-bitmap-add-flag bitmap-flagprocedure
Implements al_add_new_bitmap_flag.
- (make-bitmap* (integer width) (integer height))procedure
Implements al_create_bitmap.
- (make-bitmap (integer width) (integer height))procedure
Implements al_create_bitmap, with (free-bitmap!) declared as a finalizer.
- (bitmap-draw bitmap (float dx) (float dy) bitmap-flag)procedure
Implements al_draw_bitmap.
- (draw-bitmap bitmap (float dx) (float dy) bitmap-flag)procedure
Implements al_draw_bitmap.
- (bitmap-draw-region bitmap (float sx) (float sy) (float sw) (float sh) (float dx) (float dy) (integer bitmap-flags))procedure
Implements al_draw_bitmap_region.
- (draw-bitmap-region bitmap (float sx) (float sy) (float sw) (float sh) (float dx) (float dy) (integer bitmap-flags))procedure
Implements al_draw_bitmap_region.
- (bitmap-draw-scaled bitmap (float sx) (float sy) (float sw) (float sh) (float dx) (float dy) (float dw) (float dh) (integer bitmap-flags))procedure
Implements al_draw_scaled_bitmap.
- (draw-scaled-bitmap bitmap (float sx) (float sy) (float sw) (float sh) (float dx) (float dy) (float dw) (float dh) (integer bitmap-flags))procedure
Implements al_draw_scaled_bitmap.
- (bitmap-draw-rotated bitmap (float cx) (float cy) (float dx) (float dy) (float angle) (integer bitmap-flags))procedure
Implements al_draw_rotated_bitmap.
- (draw-rotated-bitmap bitmap (float cx) (float cy) (float dx) (float dy) (float angle) (integer bitmap-flags))procedure
Implements al_draw_rotated_bitmap.
- (bitmap-draw-scaled-rotated bitmap (float cx) (float cy) (float dx) (float dy) (float xscale) (float yscale) (float angle) (integer bitmap-flags))procedure
Implements al_draw_scaled_rotated_bitmap.
- (draw-scaled-rotated-bitmap bitmap (float cx) (float cy) (float dx) (float dy) (float xscale) (float yscale) (float angle) (integer bitmap-flags))procedure
Implements al_draw_scaled_rotated_bitmap.
- (bitmap-draw-tinted (bitmap bmp) (color tint) (float dx) (float dy) (integer bitmap-flags))procedure
Implements al_draw_tinted_bitmap.
- (draw-tinted-bitmap (bitmap bmp) (color tint) (float dx) (float dy) (integer bitmap-flags))procedure
Implements al_draw_tinted_bitmap.
- (bitmap-draw-tinted-region (bitmap bmp) (color tint) (float sx) (float sy) (float sw) (float sh) (float dx) (float dy) (integer bitmap-flags))procedure
Implements al_draw_tinted_bitmap_region.
- (draw-tinted-bitmap-region (bitmap bmp) (color tint) (float sx) (float sy) (float sw) (float sh) (float dx) (float dy) (integer bitmap-flags))procedure
Implements al_draw_tinted_bitmap_region.
- (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))procedure
Implements al_draw_tinted_scale_bitmap.
- (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))procedure
Implements al_draw_tinted_scale_bitmap.
- (bitmap-draw-tinted-rotated (bitmap bmp) (color tint) (float cx) (float cy) (float dx) (float dy) (float angle) (integer flags))procedure
Implements al_draw_tinted_rotated_bitmap.
- (draw-tinted-rotated-bitmap (bitmap bmp) (color tint) (float cx) (float cy) (float dx) (float dy) (float angle) (integer flags))procedure
Implements al_draw_tinted_rotated_bitmap.
- (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))procedure
Implements al_draw_tinted_scaled_rotated_bitmap.
- (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))procedure
Implements al_draw_tinted_scaled_rotated_bitmap.
- (bitmap-lock*! bitmap pixel-format (integer locking-flag))procedure
Implements al_lock_bitmap.
- (lock-bitmap*! bitmap pixel-format (integer locking-flag))procedure
Implements al_lock_bitmap.
- (bitmap-lock-region*! bitmap (integer x) (integer y) (integer width) (integer height) pixel-format (integer locking-flag))procedure
Implements al_lock_bitmap_region.
- (lock-bitmap-region*! bitmap (integer x) (integer y) (integer width) (integer height) pixel-format (integer locking-flag))procedure
Implements al_lock_bitmap_region.
- bitmap-unlock! bitmapprocedure
Implements al_unlock_bitmap.
- unlock-bitmap! bitmapprocedure
Implements al_unlock_bitmap.
- (bitmap-lock! bitmap pixel-format (integer bitmap-flags))procedure
Implements al_lock_bitmap, with (bitmap-unlock!) and (free-locked-region!) declared as finalizers.
- (lock-bitmap! bitmap pixel-format (integer bitmap-flags))procedure
Implements al_lock_bitmap, with (bitmap-unlock!) and (free-locked-region!) declared as finalizers.
- (bitmap-lock-region! bitmap (integer x) (integer y) (integer width) (integer height) pixel-format (integer bitmap-flags))procedure
Implements al_lock_bitmap_region, with (bitmap-unlock!) and (free-locked-region!) declared as finalizers.
- (lock-bitmap-region! bitmap (integer x) (integer y) (integer width) (integer height) pixel-format (integer bitmap-flags))procedure
Implements al_lock_bitmap_region, with (bitmap-unlock!) and (free-locked-region!) declared as finalizers.
- (bitmap-pixel! (bitmap bmp) (int x) (int y) (color c))procedure
Sets the provided color struct to the color value at the given coordinates.
- (bitmap-pixel* (bitmap bmp) (int x) (int y))procedure
Returns a new color struct of the color value at the given coordinates.
- (bitmap-pixel (bitmap bmp) (int x) (int y))procedure
Returns a new color struct of the color value at the given coordinates, with (free-color!) declared as a finalizer.
- bitmap-width bitmapprocedure
Implements al_get_bitmap_width.
- bitmap-height bitmapprocedure
Implements al_get_bitmap_height.
- bitmap-format bitmapprocedure
Implements al_get_bitmap_format.
- bitmap-flags bitmapprocedure
Implements al_get_bitmap_flags.
- bitmap-mask->alpha! bitmap colorprocedure
Implements al_convert_mask_to_alpha.
- bitmap-clone* bitmapprocedure
Implements al_clone_bitmap.
- bitmap-clone bitmapprocedure
Implements al_clone_bitmap, with (free-bitmap!) declared as a finalizer.
- bitmap-locked? bitmapprocedure
Implements al_is_bitmap_locked.
- (bitmap-put-pixel! bitmap (integer x) (integer y) (color c))procedure
Implements _al_put_pixel.
- (make-sub-bitmap* bitmap (integer x) (integer y) (integer width) (integer height))procedure
Implements al_create_sub_bitmap.
- (make-sub-bitmap bitmap (integer x) (integer y) (integer width) (integer height))procedure
Implements al_create_sub_bitmap, with (free-bitmap!) declared as a finalizer.
- sub-bitmap? bitmapprocedure
Implements al_is_sub_bitmap.
- (put-pixel (integer x) (integer y) (color c))procedure
Implements al_put_pixel.
- (put-blended-pixel (integer x) (integer y) (color c))procedure
Implements al_put_blended_pixel.
- pixel-size pixel-formatprocedure
Implements al_get_pixel_size.
- (color-map-rgb! (color c) (unsigned-byte r) (unsigned-byte g) (unsigned-byte b))procedure
Maps rgb values onto the provided color struct, implementing al_map_rgb.
- (color-map-rgba! (color c) (unsigned-byte r) (unsigned-byte g) (unsigned-byte b) (unsigned-byte a))procedure
Maps rgba values onto the provided color struct, implementing al_map_rgba.
- (color-map-rgb-float! (color c) (unsigned-byte r) (unsigned-byte g) (unsigned-byte b))procedure
Maps rgb values onto the provided color struct, implementing al_map_rgb_f.
- (color-map-rgba-float! (color c) (unsigned-byte r) (unsigned-byte g) (unsigned-byte b) (unsigned-byte a))procedure
Maps rgba values onto the provided color struct, implementing al_map_rgba_f.
- map-rgb* r g bprocedure
Returns a new color struct mapped to the given rgb values.
- map-rgb r g bprocedure
Returns a new color struct mapped to the given rgb values, with (free-color!) declared as a finalizer.
- map-rgba* r g b aprocedure
Prodcues a new color struct mapped to the given rgba values.
- map-rgba r g b aprocedure
Returns a new color struct mapped to the given rgba values, with (free-color!) declared as a finalizer.
- map-rgb-float* r g bprocedure
Returns a new color struct mapped to the given rgb values.
- map-rgb-float r g bprocedure
Returns a new color struct mapped to the given rgb values, with (free-color!) declared as a finalizer.
- map-rgba-float* r g b aprocedure
Returns a new color struct mapped to the given rgba values.
- map-rgba-float r g b aprocedure
Returns a new color struct mapped to the given rgba values, with (free-color!) declared as a finalizer.
- color-unmap-rgb colorprocedure
Returns a 3-element list of the rgb values representing a given color struct.
- color-unmap-rgba colorprocedure
Returns a 4-element list of the rgba values representing a given color struct.
- color-unmap-rgb-float colorprocedure
Returns a 3-element list of the rgb values representing a given color struct.
- color-unmap-rgba-float colorprocedure
Returns a 4-element list of the rgb values representing a given color struct.
- pixel-format-bits pixel-formatprocedure
Implements al_get_pixel_format_bits.
- clipping-rectangleprocedure
Returns a 4-element list of the x, y, width and height values of the current clipping rectangle.
- (clippingle-rectangle-set! (integer x) (integer y) (integer width) (integer height))procedure
Sets the current clipping rectangle.
- blenderprocedure
Returns a 3-element list of the op, source and destination of the current blender.
- (blender-set! (blend-operation op) (integer source) (integer destination))procedure
Implements al_set_blender.
- separate-blenderprocedure
Returns a 6-element list of the op, source, destination, alpha op, alpha source, and alpha destination.
- (separate-blender-set! (blend-operation op) (integer src) (integer destination) (integer alpha-op) (integer alpha-source) (integer alpha-destination))procedure
Implements al_set_separate_blender.
Bitmap I/O
- (register-bitmap-loader (string extension) (function bitmap ((const c-string))))procedure
Implements al_register_bitmap_loader.
- (register-bitmap-file-loader (string extension) (function bitmap (file)))procedure
Implements al_register_bitmap_loader_f.
- (register-bitmap-saver (string extension) ((function bool ((const c-string) bitmap)) saver))procedure
Implements al_register_bitmap_saver.
- (register-bitmap-file-saver (string extension) ((function bool (file bitmap)) saver))procedure
Implements al_register_bitmap_saver_f.
- load-bitmap* stringprocedure
Implements al_load_bitmap.
- load-bitmap stringprocedure
Implements al_load_bitmap, with (free-bitmap!) declared as a finalizer.
- load-bitmap-from-file* file stringprocedure
Implements al_load_bitmap_f.
- load-bitmap-from-file file stringprocedure
Implements al_load_bitmap_f, with (free-bitmap!) declared as a finalizer.
- bitmap-save bitmap stringprocedure
Implements al_save_bitmap.
- bitmap-save-to-file bitmap file stringprocedure
Implements al_save_bitmap_f.
Colors
Records
color
- colorrecord
- make-color*procedure
- make-colorprocedure
- free-color! colorprocedure
- color-red colorprocedure
- color-green colorprocedure
- color-blue colorprocedure
- color-alpha colorprocedure
Functions
Color
- color-addon-versionprocedure
Implements al_get_allegro_color_version.
- (hsv->rgb (float h) (float s) (float v))procedure
Returns a 3-element list consisting of the rgb elements.
- (rgb->hsl (float red) (float green) (float blue))procedure
Returns a 3-element list consisting of the hsl elements.
- (hsl->rgb (float hue) (float saturation) (float lightness))procedure
Returns a 3-element list consisting of the rgb elements.
- name->rgb stringprocedure
Returns a 3-element list consisting of the rgb elements.
- (rgb->name (float red) (float green) (float blue))procedure
Returns a string representation of the rgb elements.
- (cmyk->rgb (float cyan) (float magenta) (float yellow) (float key))procedure
Returns a 3-element list consisting of the rgb elements.
- (rgb->cmyk (float red) (float green) (float blue))procedure
Returns a 4-element list consisting of the cmyk elements.
- (yuv->rgb (float y) (float u) (float v))procedure
Returns a 3-element list consisting of the rgb elements.
- (rgb->yuv (float red) (float green) (float blue))procedure
Returns a 3-element list consisting of the yuv elements.
- (rgb->html (float red) (float green) (float blue))procedure
Returns a string consisting of the html representation.
- html->rgb stringprocedure
Returns a 3-element list consisting of the rgb elements.
- (make-color-rgb* (integer r) (integer g) (integer b))procedure
Creates a color struct from rgb elements.
- (make-color-rgb (integer r) (integer g) (integer b))procedure
Creates a color struct from rgb elements, with (free-color!) declared as a finalizer.
- (make-color-rgba*(integer r) (integer g) (integer b) (integer a))procedure
Creates a color struct from rgba elements.
- (make-color-rgba (integer r) (integer g) (integer b) (integer a))procedure
Creates a color struct from rgba elements, with (free-color!) declared as a finalizer.
- (make-color-yuv* (integer y) (integer u) (integer v))procedure
Creates a color struct from yuv elements.
- (make-color-yuv (integer y) (integer u) (integer v))procedure
Creates a color struct from yuv elements, with (free-color!) declared as a finalizer.
- (make-color-cmyk* (integer c) (integer m) (integer y) (integer k))procedure
Creates a color struct from cmyk elements.
- (make-color-cmyk (integer c) (integer m) (integer y) (integer k))procedure
Creates a color struct from cmyk elements, with (free-color!) declared as a finalizer.
- (make-color-hsl*(integer h) (integer s) (integer l))procedure
Creates a color struct from hsl elements.
- (make-color-hsl (integer h) (integer s) (integer l))procedure
Creates a color struct from hsl elements, with (free-color!) declared as a finalizer.
- (make-color-hsv*(integer h) (integer s) (integer v))procedure
Creates a color struct from hsv elements.
- (make-color-hsv (integer h) (integer s) (integer v))procedure
Creates a color struct from hsv elements, with (free-color!) declared as a finalizer.
- make-color-name* stringprocedure
Creates a color struct from a string name.
- make-color-name stringprocedure
Creates a color struct from a string name, with (free-color!) declared as a finalizer.
- make-color-html* stringprocedure
Creates a color struct from a html representation.
- make-color-html stringprocedure
Creates a color struct from a html representation, with (free-color!) declared as a finalizer.
- (color-yuv! color (float y) (float u) (float v))procedure
Maps yuv elements to a color struct.
- (color-cmyk! color (float c) (float m) (float y) (float k))procedure
Maps cmyk elements to a color struct.
- (color-hsl! color (float h) (float s) (float l))procedure
Maps hsl elements to a color struct.
- (color-hsv! color (float h) (float s) (float v))procedure
Maps hsv elements to a color struct.
- color-name! color stringprocedure
Maps a color name to a color struct.
- color-html! color stringprocedure
Maps a html representation to a color struct.
Config
Records
config
- configrecord
config-entry
<record>config-entry</config>
config-section
- config-sectionrecord
Functions
Config Files
- make-config*procedure
Implements al_create_config.
- make-configprocedure
Implements al_create_config, with (free-config!) declared as a finalizer.
- free-config! configprocedure
Implements al_destroy_config.
- config-section-add! config stringprocedure
Implements al_add_config_section.
- (config-value-set! config (string section) (string key) (string value))procedure
Implements al_set_config_value.
- (config-comment-add! config (string section) (string comment))procedure
Implements al_add_config_comment.
- (config-value config (string section) (string key))procedure
Implements al_get_config_value.
- load-config* stringprocedure
Implements al_load_config_file.
- load-config stringprocedure
Implements al_load_config_file, with (free-config!) decalred as a finalizer.
- load-config-from-file* fileprocedure
Implements al_load_config_file_f.
- load-config-from-file fileprocedure
Implements al_load_config_file_f, with (free-config!) declared as a finalizer.
- config-save config stringprocedure
Implements al_save_config_file.
- config-save-to-file config fileprocedure
Implements al_save_config_file_f.
- config-merge! config configprocedure
Implements al_merge_config_into.
- config-merge config configprocedure
Implements al_merge_config.
- config-sections configprocedure
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!
- config-entries config config-sectionprocedure
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
- (trace-prefix (string channel) (int level) (string file) (int line) (string function))procedure
Implements _al_trace_prefix.
- trace-level-debugprocedure
Implements ALLEGRO_DEBUG.
- trace-level-infoprocedure
Implements ALLEGRO_INFO.
- trace-level-warnprocedure
Implements ALLEGRO_WARN.
- trace-level-errorprocedure
Implements ALLEGRO_ERROR.
- debug-assert boolprocedure
Implements ALLEGRO_ASSERT.
Errors
- error-numberprocedure
Implements al_get_errno.
- error-number-set!procedure
Implements al_set_errno.
Displays
Constants
- default-display-adapter
- vertex-cache-size
Enums
display-flag
- display-flag->int display-flagprocedure
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
- int->display-flag integerprocedure
display-option
- display-option->int display-optionprocedure
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
- int->display-option integerprocedure
display-option-importance
- display-option-importance->int display-option-importanceprocedure
display-option-importance may be one of the following symbols:
- dont-care
- require
- suggest
display-orientation
- display-orientation->int display-orientationprocedure
display-orientation may be one of the following symbols:
- degrees-0
- degrees-90
- degrees-180
- degrees-270
- face-up
- face-down
- int->display-oprientation integerprocedure
gl-variant
- gl-variant->int gl-variantprocedure
gl-variant may be one of the following symbols:
- opengl
- opengl-es
- int->gl-variant integerprocedure
Records
display
- displayrecord
display-mode
- display-moderecord
- make-display-mode*procedure
- make-display-modeprocedure
- free-display-mode! display-modeprocedure
- display-mode-width display-modeprocedure
- display-mode-width-set! display-mode integersetter
- display-mode-height display-modeprocedure
- display-mode-height-set! display-mode integersetter
- display-mode-format display-modeprocedure
- display-mode-format-set! display-mode pixel-formatsetter
- display-mode-refresh-rate display-modeprocedure
- display-mode-refresh-rate-set! display-mode integersetter
monitor
- monitorrecord
- make-monitor*procedure
- make-monitorprocedure
- free-monitor! monitorprocedure
- monitor-x1 monitorprocedure
- monitor-y1 monitorprocedure
- monitor-x2 monitorprocedure
- monitor-y2 monitorprocedure
Functions
Display
- new-display-refresh-rateprocedure
Implements al_get_new_display_refresh_rate.
- new-display-refresh-rate-set! integerprocedure
Implements al_set_new_display_refresh_rate.
- new-display-flagsprocedure
Implements al_get_new_display_flags.
- new-display-flags-set! integerprocedure
Implements al_set_new_display_flags.
- new-display-adapterprocedure
Implements al_get_new_display_adapter.
- new-display-adapter-set! integerprocedure
Implements al_set_new_display_adpater.
- new-display-window-positionprocedure
Returns a 2-element list consisting of the new display coordinates.
- (new-display-window-position-set! (integer x) (integer y))procedure
Sets the a new display's window position.
- new-display-option-value display-optionprocedure
Retrieves the value for a particular display-option for newly created displays.
- new-display-option-importance display-optionprocedure
Retrieves the importance for a particular display-option for newly created dispalys.
- (new-display-option-set! display-option (integer value) display-option-importance)procedure
Implements al_set_new_display_option.
- new-display-reset-optionsprocedure
Implements al_reset_new_display_options.
- (make-display* (integer width) (integer height))procedure
Implements al_create_display.
- (make-display (integer width) (integer height))procedure
Implements al_create_display, with (free-display!) declared as a finalizer.
- (make-display/mode* display-mode (integer adapter) (integer flags))procedure
Creates a new display, taking the refresh rate, width and height from a display-mode struct.
- (make-display/mode display-mode (integer adapter) (integer flags))procedure
Creates a new display, taking the refresh rate, width and height from a display-mode struct, with (free-display-mode!) declared as a finalizer.
- free-display! displayprocedure
Implements al_destroy_display.
- current-displayprocedure
Implements al_get_current_display.
- display-mode-countprocedure
Implements al_get_num_display_modes.
- (display-mode-init! display-mode (integer index))procedure
Implements al_get_display_mode, returning #f if unsuccessful.
- (update-display-region! (integer x) (integer y) (integer width) (integer height))procedure
Implements al_update_display_region.
- compatible-bitmap? bitmapprocedure
Implements al_is_compatible_bitmap.
- wait-for-vsyncprocedure
Implements al_wait_for_vsync.
- (draw-pixel (float x) (floay y) color)procedure
Implements al_draw_pixel.
- video-adapter-countprocedure
Implements al_get_num_video_adapters.
- (monitor-init! monitor (integer adapter))procedure
Implements al_get_monitor_info.
- display-option display display-optionprocedure
Implements al_get_display_option.
- display-hold-bitmap-drawing! boolsetter
Implements al_hold_bitmap_drawing.
- display-bitmap-drawing-held?procedure
Implements al_is_bitmap_drawing_help.
- display-window-title-set! display stringprocedure
Implements al_set_window_title.
- display-width displayprocedure
Implements al_get_display_width.
- display-height displayprocedure
Implements al_get_display_height.
- display-format displayprocedure
Implements al_get_display_format.
- display-refresh-rate displayprocedure
Implements al_get_display_refresh_rate.
- display-flags displayprocedure
Implements al_get_display_flags.
- display-toggle-flag! display display-flag boolprocedure
Implements al_toggle_display_flag.
- display-backbuffer displayprocedure
Implements al_get_backbuffer.
- display-acknowledge-resize displayprocedure
Implements al_acknowledge_resize.
- (display-resize! display (integer width) (integer height))procedure
Implements al_resize_display.
- display-event-source displayprocedure
Implements al_get_display_event_source.
- display-iconset! display bitmapprocedure
Implements al_set_display_icon.
- clear-to-color colorprocedure
Implements al_clear_to_color.
- target-bitmapprocedure
Implements al_get_target_bitmap.
- target-bitmap-set! bitmapprocedure
Implements al_set_target_bitmap.
- target-backbuffer-set! displayprocedure
Implements al_set_target_backbuffer.
- flip-displayprocedure
Implements al_flip_display.
Direct3D
- d3d-non-pow2-texture-support?procedure
Implements al_have_d3d_non_pow2_texture_support.
- d3d-non-square-texture-support?procedure
Implements al_have_d3d_non_square_texture_support.
Bitmap Specific
- bitmap-d3d-system-texture bitmapprocedure
Implements al_get_d3d_system_texture.
- bitmap-d3d-video-texture bitmapprocedure
Implements al_get_d3d_video_texture.
- bitmap-d3d-texture-position bitmapprocedure
Returns a 2-element list consisting of a u, v pair.
Display Specific
- display-d3d-device-lost? displayprocedure
Implements al_is_d3d_device_lost.
- display-d3d-device displayprocedure
Implements al_get_d3d_device.
OpenGL
- opengl-addon-versionprocedure
Implements al_get_opengl_version.
- opengl-extension-exists? stringprocedure
Implements al_have_opengl_extension.
- opengl-proc-address stringprocedure
Implements al_get_opengl_proc_address.
- opengl-texture bitmapprocedure
Implements al_get_opengl_texture.
- opengl-remove-fbo! bitmapprocedure
Implements al_remove_opengl_fbo.
- opengl-fbo bitmapprocedure
Implements al_get_opengl_fbo.
- opengl-texture-size bitmapprocedure
Returns a 2-element list of the width and height of the opengl texture for the given bitmap.
- opengl-texture-position bitmapprocedure
Returns a 2-element list of the u,v position of the opengl texture for the given bitmap.
- opengl-context-set! displayprocedure
Implements al_set_current_opengl_context.
- opengl-variantprocedure
Implements al_get_opengl_variant.
Windows
- windows-window-handleprocedure
Implements al_get_win_window_handle.
Drawing
Constants
- primitive-quality
Enums
primitive-attribute
- primitive-attribute->int primitive-attributeprocedure
primitive-attribute may be one of the following symbols:
- position
- color
- texture-coordinate
- texture-pixel-coordinate
- int->primitive-attribute integerprocedure
primitive-type
- primitive-type->int primitive-typeprocedure
primitive-type may be one of the following symbols:
- line-list
- line-strip
- line-loop
- triangle-list
- triangle-strip
- point-list
- int->primitive-type integerprocedure
primitive-storage
- primitive-storage->int primitive-storageprocedure
primitive-storage may be one of the following symbols:
- float-2
- float-3
- short-2
- int->primitive-storage integerprocedure
Records
transform
- transformrecord
- make-transform*procedure
- make-transformprocedure
- free-transform! transformprocedure
- transform-value transform i jprocedure
vertex
- vertexrecord
- make-vertex*procedure
- make-vertexprocedure
- free-vertex! vertexprocedure
- vertex-x vertexprocedure
- vertex-x-set! vertex floatsetter
- vertex-y vertexprocedure
- vertex-y-set! vertex floatsetter
- vertex-z vertexprocedure
- vertex-z-set! vertex floatsetter
- vertex-u vertexprocedure
- vertex-u-set! vertex floatsetter
- vertex-v vertexprocedure
- vertex-v-set! vertex floatsetter
vertex-declaration
- vertex-declarationrecord
vertex-element
- vertex-elementrecord
- make-vertex-element*procedure
- make-vertex-elementprocedure
- free-vertex-element! vertex-elementprocedure
- vertex-element-attribute vertex-elementprocedure
- vertex-element-attribute-set! vertex-element primitive-attributesetter
- vertex-element-storage vertex-elementprocedure
- vertex-element-storage-set! vertex-element primitive-storagesetter
- vertex-element-offset vertex-elementprocedure
- vertex-element-offset-set! vertex-element integersetter
Functions
Image Formats
- image-addon-installprocedure
Implements al_init_image_addon.
- image-addon-uninstallprocedure
Implements al_shutdown_image_addon.
- image-addon-versionprocedure
Implements al_get_allegro_image_version.
Primitives
- primitives-addon-versionprocedure
Implements al_get_allegro_primitives_version.
- primitives-addon-installprocedure
Implements al_init_primitives_addon.
- primitives-addon-uninstallprocedure
Implements al_shutdown_primitives_addon.
- make-vertex-declaration* vertex-element integerprocedure
Implements al_create_vertex_decl.
- make-vertex-declaration vertex-element integerprocedure
Implements al_create_vertex_decl, with (free-vertex-declaration!) declared as a finalizer.
- free-vertex-declaration! vertex-declarationprocedure
Implements al_destroy_vertex_decl.
- (draw-primitive (c-pointer vertices) vertex-declaration bitmap (integer start) (integer end) primitive-type)procedure
Implements al_draw_prim.
- (draw-indexed-primitive (c-pointer vertices) vertex-declaration bitmap (s32-vector indices) (integer count) primitive-type)procedure
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.
- (draw-line (float x1) (float y1) (float x2) (float y2) (color c) (float thickness))procedure
Implements al_draw_line.
- (draw-triangle (float x1) (float y1) (float x2) (float y2) (float x3) (float y3) (color c) (float thickness))procedure
Implements al_draw_triangle.
- (draw-rectangle (float x1) (float y1) (float x2) (float y2) (color c) (float thickness))procedure
Implements al_draw_rectangle.
- (draw-rounded-rectangle (float x1) (float y1) (float x2) (float y2) (float rx) (float ry) (color c) (float thickness))procedure
Implements al_draw_rounded_rectangle.
- (draw-circle (float cx) (float cy) (float r) (color c) (float thickness))procedure
Implements al_draw_circle.
- (draw-ellipse (float cx) (float cy) (float rx) (float ry) (color c) (float thickness))procedure
Implements al_draw_ellipse.
- (draw-arc (float cx) (float cy) (float r) (float start_theta) (float delta_theta) (color c) (float thickness))procedure
Implements al_draw_arc.
- (draw-spline (f32vector points) (color c) (float thickness))procedure
Implements al_draw_spline.
- (draw-ribbon (f32vector points) (integer32 stride) (color c) (float thickness) (integer32 num_segments))procedure
Implements al_draw_ribbon.
- (draw-triangle/fill (float x1) (float y1) (float x2) (float y2) (float x3) (float y3) (color c))procedure
Implements al_draw_filled_triangle.
- (draw-rectangle/fill (float x1) (float y1) (float x2) (float y2) (color c))procedure
Implements al_draw_filled_rectangle.
- (draw-rounded-rectangle/fill (float x1) (float y1) (float x2) (float y2) (float rx) (float ry) (color c))procedure
Implements al_draw_filled_rounded_rectangle.
- (draw-circle/fill (float cx) (float cy) (float r) (color c))procedure
Implements al_draw_filled_circle.
- (draw-ellipse/fill (float cx) (float cy) (float rx) (float ry) (color c))procedure
Implements al_draw_filled_ellipse.
- (calculate-arc (integer32 stride) (float cx) (float cy) (float rx) (float ry) (float start_theta) (float delta_theta) (float thickness) (integer32 num_segments))procedure
Implements al_calculate_arc.
- (calculate-spline (integer32 stride) (f32vector points) (float thickness) (int num_segments))procedure
Implements al_calculate_spline.
- (calculate-ribbon (integer32 dest_stride) ((const f32vector) points) (integer32 points_stride) (float thickness) (integer32 num_segments))procedure
Implements al_calculate_ribbon.
Transformations
- transform-use transformprocedure
Implements al_use_transform.
- transform-copy! transform transformprocedure
Implements al_copy_transform.
- transform-identity! transformprocedure
Implements al_identity_transform.
- (transform-build! transform (float x) (float y) (float sx) (float sy) (float theta))procedure
Implements al_build_transform.
- (transform-translate! transform (float x) (float y))procedure
Implements al_translate_transform.
- (transform-scale! transform (float sx) (float sy))procedure
Implements al_scale_transform.
- (transform-coordinates transform (float x) (float y))procedure
Implements al_transform_coordinates; returns a 2-element list of the transformed coordinate pair.
- transform-compose! transform transformprocedure
Implements al_compose_transform.
- transform-invert! transformprocedure
Implements al_invert_transform.
- transform-check-inverse transform floatprocedure
Implements al_check_inverse.
- current-transformprocedure
Implements al_get_current_transform.
Events
Enums
event-type
- event-type->int event-typeprocedure
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
- int->event-type integerprocedure
Records
any-event
- any-eventrecord
- any-event-type any-eventprocedure
- any-event-source any-eventprocedure
- any-event-timestamp any-eventprocedure
display-event
- display-eventrecord
- display-event-type display-eventprocedure
- display-event-source display-eventprocedure
- display-event-timestamp display-eventprocedure
- display-event-x display-eventprocedure
- display-event-y display-eventprocedure
- display-event-width display-eventprocedure
- display-event-height display-eventprocedure
- display-event-orientation display-eventprocedure
event
- eventrecord
- make-eventprocedure
- make-event*procedure
- free-event! eventprocedure
event-source
- event-sourcerecord
event-queue
- event-queuerecord
joystick-event
- joystick-eventrecord
- joystick-event-type joystick-eventprocedure
- joystick-event-source joystick-eventprocedure
- joystick-event-timestamp joystick-eventprocedure
- joystick-event-id joystick-eventprocedure
- joystick-event-stick joystick-eventprocedure
- joystick-event-axis joystick-eventprocedure
- joystick-event-position joystick-eventprocedure
- joystick-event-button joystick-eventprocedure
keyboard-event
- keyboard-eventrecord
- keyboard-event-type keyboard-eventprocedure
- keyboard-event-source keyboard-eventprocedure
- keyboard-event-timestamp keyboard-eventprocedure
- keyboard-event-display keyboard-eventprocedure
- keyboard-event-keycode keyboard-eventprocedure
- keyboard-event-unichar keyboard-eventprocedure
- keyboard-event-modifiers keyboard-eventprocedure
- keyboard-event-repeat keyboard-eventprocedure
mouse-event
- mouse-eventrecord
- mouse-event-type mouse-eventprocedure
- mouse-event-source mouse-eventprocedure
- mouse-event-timestamp mouse-eventprocedure
- mouse-event-display mouse-eventprocedure
- mouse-event-x mouse-eventprocedure
- mouse-event-y mouse-eventprocedure
- mouse-event-z mouse-eventprocedure
- mouse-event-w mouse-eventprocedure
- mouse-event-dx mouse-eventprocedure
- mouse-event-dy mouse-eventprocedure
- mouse-event-dz mouse-eventprocedure
- mouse-event-dw mouse-eventprocedure
- mouse-event-button mouse-eventprocedure
- mouse-event-pressure mouse-eventprocedure
timer-event
- timer-eventrecord
- timer-event-type timer-eventprocedure
- timer-event-source timer-eventprocedure
- timer-event-timestamp timer-eventprocedure
- timer-event-count timer-eventprocedure
- timer-event-error timer-eventprocedure
user-event
- user-eventrecord
- user-event-type user-eventprocedure
- user-event-source user-eventprocedure
- user-event-timestamp user-eventprocedure
- user-event-data1 user-eventprocedure
- user-event-data1-set! user-event integersetter
- user-event-data2 user-eventprocedure
- user-event-data2-set! user-event integersetter
- user-event-data3 user-eventprocedure
- user-event-data3-set! user-event integersetter
- user-event-data4 user-eventprocedure
- user-event-data4-set! user-event integersetter
Functions
- user-event-type? integerprocedure
Implements ALLEGRO_EVENT_TYPE_IS_USER.
- (make-event-type (integer a) (integer b) (integer c) (integer d))procedure
Implements ALLEGRO_GET_EVENT_TYPE.
- event-type eventprocedure
Returns the type of a given event struct.
- event->any-event eventprocedure
Converts an event to an any-event.
- event->display-event eventprocedure
Converts an event to a display-event.
- event->joystick-event eventprocedure
Converts an event to a joystick-event.
- event->keyboard-event eventprocedure
Converts an event to a keyboard-event.
- event->mouse-event eventprocedure
Converts an event to a mouse-event.
- event->timer-event eventprocedure
Converts an event to a timer-event.
- event->user-event eventprocedure
Converts an event to a user-event.
- user-event-source-init! event-sourceprocedure
Implements al_init_user_event_source.
- free-user-event-source! event-sourceprocedure
Implements al_destroy_user_event_source.
- (emit-user-event! event-source event (function void (user-event)))procedure
Implements al_emit_user_event.
- user-event-unref! user-eventprocedure
Implements al_unref_user_event.
- event-source-data event-sourceprocedure
Implements al_get_event_source_data.
- event-source-data-set! event-source integerprocedure
Implements al_set_event_source_data.
- make-event-queue*procedure
Implements al_create_event_queue.
- make-event-queueprocedure
Implements al_create_event_queue, with (free-event-queue!) declared as a finalizer.
- free-event-queue! event-queueprocedure
Implements al_destroy_event_queue.
- event-queue-register-source! event-queue event-sourceprocedure
Implements al_register_event_source.
- event-queue-unregister-source! event-queue event-sourceprocedure
Implements al_unregister_event_source.
- event-queue-empty? event-queueprocedure
Implements al_is_event_queue_empty.
- event-queue-next! event-queue eventprocedure
Implements al_get_next_event.
- event-queue-peek! event-queue eventprocedure
Implements al_peek_next_event.
- event-queue-drop-next! event-queueprocedure
Implements al_drop_next_event_queue.
- event-queue-flush! event-queueprocedure
Implements al_drop_next_event.
- event-queue-wait! event-queue eventprocedure
Implements al_wait_for_event.
- event-queue-timed-wait! event-queue event floatprocedure
Implements al_wait_for_event_timed.
- event-queue-wait-until! event-queue event timeoutprocedure
Implements al_wait_for_event_until.
Files
Constants
- eof
Enums
file-mode
- file-mode->int file-modeprocedure
file-mode may be one of the following symbols:
- read
- write
- execute
- hidden
- file
- directory
- int->file-mode integerprocedure
seek-flag
- seek-flag->int seek-flagprocedure
seek-flag may be one of the following symbols:
- set
- current
- end
- int->seek-flag integerprocedure
Records
file
- filerecord
file-interface
- file-interfacerecord
fs-entry
- fs-entryrecord
- fs-entry-vtable fs-entryprocedure
fs-interface
- fs-interfacerecord
- free-fs-interface! fs-interfaceprocedure
- fs-interface-create-entry fs-interfaceprocedure
- fs-interface-entry-name fs-interfaceprocedure
- fs-interface-update-entry fs-interfaceprocedure
- fs-interface-entry-mode fs-interfaceprocedure
- fs-interface-atime fs-interfaceprocedure
- fs-interface-mtime fs-interfaceprocedure
- fs-interface-ctime fs-interfaceprocedure
- fs-interface-entry-size fs-interfaceprocedure
- fs-interface-entry-exists? fs-interfaceprocedure
- fs-interface-remove-entry fs-interfaceprocedure
- fs-interface-open-directory fs-interfaceprocedure
- fs-interface-read-directory fs-interfaceprocedure
- fs-interface-close-directory fs-interfaceprocedure
- fs-interface-current-directory fs-interfaceprocedure
- fs-interface-make-directory fs-interfaceprocedure
- fs-interface-filename-exists? fs-interfaceprocedure
- fs-interface-remove-filename fs-interfaceprocedure
- fs-interface-open-file fs-interfaceprocedure
path
- pathrecord
Functions
File Operations
- (make-temp-file* (string template) ((c-pointer path) out_path))procedure
Implements al_make_temp_file.
- (make-temp-file (string template) ((c-pointer path) out_path))procedure
Implements al_make_temp_file, with (free&close-file!) declared as a finalizer.
- (file-open* (string path) (string mode))procedure
Implements al_fopen.
- (file-open (string path) (string mode))procedure
Implements al_fopen, with (free&close-file!) declared as a finalizer.
- (file-open-fd* (integer file-descriptor) (string mode))procedure
Implements al_fopen_fd.
- (file-open-fd (integer file-descriptor) (string mode))procedure
Implements al_fopen_fd, with (free&close-file!) declared as a finalizer.
- free&close-file! fileprocedure
Closes a file with (file-close!), then uses (free!) to clear the file struct from memory.
- file-close! fileprocedure
Implements al_fclose.
- (file-read! file blob (integer size))procedure
Implements al_fread.
- (file-write! file blob (integer size))procedure
Implements al_fwrite.
<procedure>(file-tell file)</procedure.
Implements al_ftell.
- (file-seek! file (integer offset) (integer whence))procedure
Implements al_fseek.
- file-eof? fileprocedure
Implements al_feof.
- file-error? fileprocedure
Implements al_ferror.
- file-clear-error! fileprocedure
Implements al_fclearerr.
- (file-unget-chars! file (integer count))procedure
Implements al_fungetc.
- file-size fileprocedure
Implements al_fsize.
- file-get-char! fileprocedure
Implements al_fgetc.
- (file-put-char! file (integer character))procedure
Implements al_fputc.
- file-read-16le! fileprocedure
Implements al_fread16le.
- file-read-16be! fileprocedure
Implements al_fread16be.
- file-write-16le! file integerprocedure
Implements al_fwrite16le.
- file-read-32le! fileprocedure
Implements al_fread32le.
- file-read-32be! fileprocedure
Implements al_fread32be.
- file-write-32le! file integerprocedure
Implements al_fwrite32le.
- file-write-32be! file integerprocedure
Implements al_fwrite32be.
- (file-get-string! file blob (integer max))procedure
Implements al_fgets.
- file-get-utf-string*! fileprocedure
Implements al_get_ustr.
- file-get-utf-string! fileprocedure
Implements al_get_ustr, with (free-utf-string!) declared as a finalizer.
- file-put-string! file stringprocedure
Implements al_fputs.
- file-userdata fileprocedure
Implements al_get_file_userdata.
- new-file-interface-set! file-interfaceprocedure
Implements al_set_new_file_interface.
- (file-interface-open* file-interface (string path) (string mode))procedure
Implements al_fopen_interface.
- (file-interface-open file-interface (string path) (string mode))procedure
Implements al_fopen_interface, with (free&close-file!) declared as a finalizer.
- (make-file-handle* file-interface (c-pointer userdata))procedure
Implements al_create_file_handle.
- (make-file-handle file-interface (c-pointer userdata))procedure
Implements al_create_file_handle, with (free&close-file!) decalred as a finalizer.
File System Hooks
- make-fs-entry* stringprocedure
Implements al_create_fs_entry.
- make-fs-entry stringprocedure
Implements al_create_fs_entry, with (free-fs-entry!) declared as a finalizer.
- free-fs-entry! fs-entryprocedure
Implements al_destroy_fs_entry.
- fs-entry-name fs-entryprocedure
Implements al_get_fs_entry_name.
- fs-entry-update! fs-entryprocedure
Implements al_update_fs_entry.
- fs-entry-mode fs-entryprocedure
Implements al_get_fs_entry_mode.
- fs-entry-atime fs-entryprocedure
Implements al_get_fs_entry_atime.
- fs-entry-mtime fs-entryprocedure
Implements al_get_fs_entry_mtime.
- fs-entry-ctime fs-entryprocedure
Implements al_get_fs_entry_ctime.
- fs-entry-size fs-entryprocedure
Implements al_get_fs_entry_size.
- fs-entry-exists? fs-entryprocedure
Implements al_fs_entry_exists.
- fs-entry-remove! fs-entryprocedure
Implements al_remove_fs_entry.
- fs-entry-open fs-enty stringprocedure
Implements al_open_fs_entry.
- fs-entry-directory-open! fs-entryprocedure
Implements al_open_directory.
<procedure>(fs-entry-directory-read fs-entry)<procedure>
Implements al_read_directory.
- fs-entry-directory-close! fs-entryprocedure
Implements al_close_directory.
- current-directoryprocedure
Implements al_get_current_directory.
- change-directory stringprocedure
Implements al_change_directory.
- make-directory stringprocedure
Implements al_make_directory.
- filename-exists? stringprocedure
Implements al_filename_exists.
- filename-remove! stringprocedure
Implements al_remove_filename.
- new-file-interfaceprocedure
Implements al_get_new_file_interface.
- current-fs-interfaceprocedure
Implements al_get_fs_interface.
- current-fs-interface-set!setter
Implements al_set_fs_interface.
- standard-fs-interface-set!setter
Implements al_set_standard_fs_interface.
Paths
- make-path* stringprocedure
Implements al_create_path.
<procedure>(make-path string)<procedure>
Implements al_create_path, with (free-path!) declared as a finalizer.
- make-path-for-directory* stringprocedure
Implements al_create_path_for_directory.
- make-path-for-directory stringprocedure
Implements al_create_path_for_directory, with (free-path!) declared as a finalizer.
- free-path! pathprocedure
Implements al_destroy_path.
- (path->string path (char separator))procedure
Implements al_path_cstr.
- path-component-count pathprocedure
Implements al_get_path_num_components.
- path-component path integerprocedure
Implements al_get_path_compoenent.
- path-component-set! path integer stringsetter
Implements al_replace_path_component.
- path-component-remove! path integerprocedure
Implements al_remove_path_component.
- path-component-insert! path integer stringprocedure
Implements al_insert_path_component.
- path-clone pathprocedure
Implements al_clone_path.
- path-tail pathprocedure
Implements al_get_path_tail.
- path-drop-tail! pathprocedure
Implements al_drop_path_tail.
- path-append! path stringprocedure
Implements al_append_path_component.
- path-join! path pathprocedure
Implements al_join_paths.
- path-rebase! path pathprocedure
Implements al_rebase_path.
- path-drive pathprocedure
Implements al_get_path_drive.
- path-drive-set! path stringsetter
Implements al_set_path_drive.
- path-filename pathprocedure
Implements al_get_path_filename.
- path-filename-set! path stringsetter
Implements al_set_path_filename.
- path-extension pathprocedure
Implements al_get_path_extension.
- path-extension-set! path stringsetter
Implements al_set_path_extension.
- path-basename pathprocedure
Implements al_get_path_basename.
- path-make-canonical! pathprocedure
Implements al_make_path_canonical.
PhysicsFS
See also: the physfs egg.
- enable-physfs-file-interfaceprocedure
Implements al_set_physfs_file_interface.
- physfs-addon-versionprocedure
Implements al_get_allegro_physfs_version.
Fonts
Enums
font-align
- font-align->int font-alignprocedure
font-align may be one of the following symbols:
- left
- center
- right
- int->font-align integerprocedure
Records
font
- fontrecord
- font-data fontprocedure
- font-height fontprocedure
utf-string
- utf-stringrecord
Functions
Fonts
- (register-font-loader (string extension) (function font (string integer integer)))procedure
Implements al_register_font_loader.
- load-bitmap-font* stringprocedure
Implements al_load_bitmap_font.
- load-bitmap-font stringprocedure
Implements al_load_bitmap_font, with (free-font!) declared as a finalizer.
- (load-font* string (integer size) (integer flags))procedure
Implements al_load_font.
- (load-font string (integer size) (integer flags))procedure
Implements al_load_font, with (free-font!) declared as a finalizer.
- (make-font-from-bitmap* bitmap (integer n) (s32vector ranges))procedure
Implements al_grab_font_from_bitmap.
- (make-font-from-bitmap bitmap (integer n) (s32vector ranges))procedure
Implements al_grab_font_from_bitmap, with (free-font!) declared as a finalizer.
- free-font! fontprocedure
Implements al_destroy_font.
- (font-draw-utf (font f) (color c) (float x) (float y) (font-align flags) (utf-string ustr))procedure
Implements al_draw_ustr.
- (font-draw-string (font f) (color c) (float x) (float y) (font-align flags) (string text))procedure
Implements al_draw_text.
- (font-draw-justified-string (font f) (color c) (float x1) (float x2) (float y) (float diff) (font-align flags) (c-string text))procedure
Implements al_draw_justified_text.
- (font-draw-justified-utf-string (font f) (color c) (float x1) (float x2) (float y) (float diff) (font-align flags) (utf-string text))procedure
Implements al_draw_justified_ustr.
- font-width font stringprocedure
Implements al_get_text_width.
- font-utf-width font utf-stringprocedure
Implements al_get_ustr_width.
- font-line-height fontprocedure
Implements al_get_font_line_height.
- font-ascent fontprocedure
Implements al_get_font_ascent.
- font-descent fontprocedure
Implements al_get_font_descent.
- (font-utf-dimensions (font f) (utf-string text))procedure
Returns a 4-element list consisting of the bounding box elements: x, y, width and height.
- (font-dimensions (font f) (string text))procedure
Returns a 4-element list consisting of the bounding box elements: x, y, width and height.
- font-addon-installprocedure
Implements al_init_font_addon.
- font-addon-uninstallprocedure
Implements al_shutdown_font_addon.
- font-addon-versionprocedure
Implements al_get_allegro_font_version.
True Type Font Support
- (load-ttf* (string filename) (integer size) (integer flags))procedure
Implements al_load_ttf_font.
- (load-ttf (string filename) (integer size) (integer flags))procedure
Implements al_load_ttf_font, with (free-font!) declared as a finalizer.
- (load-ttf-from-file* (file f) (string filename) (integer size) (integer flags))procedure
Implements al_load_ttf_font_f.
- (load-ttf-from-file (file f) (string filename) (integer size) (integer flags))procedure
Implements al_load_ttf_font_f, with (free-font!) declared as a finalizer.
- ttf-addon-installprocedure
Implements al_init_ttf_addon.
- ttf-addon-uninstallprocedure
Implements al_shutdown_ttf_addon.
- ttf-addon-versionprocedure
Implements al_get_allegro_ttf_version.
UTF Strings
- make-utf-string* stringprocedure
Implements al_ustr_new.
- make-utf-string stringprocedure
Implements al_ustr_new, with (free-utf-string!) declared as a finalizer.
- make-utf-string-from-buffer* blobprocedure
Given a blob, produces a new utf-string.
- make-utf-string-from-buffer blobprocedure
Given a blob, produces a new utf-string, with (free-utf-string!) declared as a finalizer.
- free-utf-string! utf-stringprocedure
Implements al_ustr_free.
- utf->string utf-stringprocedure
Implements al_cstr.
- utf->buffer! utf-string blobprocedure
Implements al_ustr_to_buffer.
- utf->string-copy utf-stringprocedure
Implements al_cstr_dup.
- utf-copy* utf-stringprocedure
Implements al_ustr_dup.
- utf-copy utf-stringprocedure
Implements al_ustr_dup, with (free-utf-string!) declared as a finalizer.
- (utf-substring* utf-string (integer start) (integer end))procedure
Implements al_ustr_dup_substr.
- (utf-substring utf-string (integer start) (integer end))procedure
Implements al_ustr_dup_substr, with (free-utf-string!) declared as a finalizer.
- utf-empty-stringprocedure
Implements al_ustr_empty_string.
- make-utf-null-string*procedure
Makes an empty utf-string struct, where the string pointer is unset.
- make-utf-null-stringprocedure
Makes an empty utf-string struct, where the string pointer is unset, with (free-utf-string!) declared as a finalizer.
- utf-reference-cstr* stringprocedure
Implements al_ref_cstr.
- utf-reference-cstr stringprocedure
Implements al_ref_cstr, with (free-utf-string!) declared as a finalizer.
- utf-reference-buffer* blobprocedure
Implements al_ref_buffer.
- utf-reference-buffer blobprocedure
Implements al_ref_buffer, with (free-utf-string!) declared as a finalizer.
- (utf-reference-utf-string* utf-string (integer start) (integer end))procedure
Implements al_ref_ustr.
- (utf-reference-utf-string utf-string (integer start) (integer end))procedure
Implements al_ref_ustr, with (free-utf-string!) declared as a finalizer.
- utf-size utf-stringprocedure
Implements al_ustr_size.
- utf-length utf-stringprocedure
Implements al_ustr_length.
- utf-offset utf-string integerprocedure
Implements al_ustr_offset.
- utf-next utf-string integerprocedure
Implements al_ustr_next, modified to return #f at the end of the string.
- utf-previous utf-string integerprocedure
Implements al_ustr_prev, modified to return #f at the end of the string.
- utf-get utf-string integerprocedure
Implements al_ustr_get.
- utf-get-next utf-string integerprocedure
Returns a 2-element list consisting of the next code and its position, or #f if at the end of the string.
- utf-get-prev utf-string integerprocedure
Returns a 2-element list consisting of the previous code and its position, or #f if at the start of the string.
- utf-remove-char! utf-string integerprocedure
Implements al_ustr_remove_chr.
- (utf-remove-range! utf-string (integer start) (integer end))procedure
Implements al_ustr_remove_range.
- utf-truncate! utf-string integerprocedure
Implements al_ustr_truncate.
- utf-ltrim! utf-stringprocedure
Implements al_ustr_ltrim_ws.
- utf-rtrim! utf-stringprocedure
Implements al_ustr_rtrim_ws.
- utf-trim! utf-stringprocedure
Implements al_ustr_trim_ws.
- utf-assign! utf-string utf-stringprocedure
Implements al_ustr_assign.
- (utf-assign-substring! utf-string utf-string (integer start) (integer end))procedure
Implements al_ustr_assign_substr.
- utf-assign-string! utf-string stringprocedure
Implements al_ustr_assign_cstr.
- (utf-set-char! utf-string (integer pos) (integer char))procedure
Implements al_ustr_set_chr.
- (utf-replace-range! utf-string (integer start) (integer end) utf-string)procedure
Implements al_ustr_replace_range.
- (utf-find utf-string (integer start) utf-string)procedure
Implements al_ustr_find_str.
- (utf-find-string utf-string (integer start) string)procedure
Implements al_ustr_find_cstr.
- (utf-find-char utf-string (integer start) (integer char))procedure
Implements al_ustr_find_chr.
- (utf-find-set utf-string (integer start) utf-string)procedure
Implements al_ustr_find_set.
- utf-find-set-string utf-string integer stringprocedure
Implements al_ustr_find_set_cstr.
- utf-find-cset utf-string integer utf-stringprocedure
Implements al_ustr_find_cset.
- utf-find-cset-string utf-string integer stringprocedure
Implements al_ustr_find_set_cstr.
- utf-rfind utf-string integer utf-stringprocedure
Implements al_ustr_rfind_str.
- (utf-rfind-char utf-string integer (integer char))procedure
Implements al_ustr_rfind_char.
- utf-rfind-string utf-string integer stringprocedure
Implements al_ustr_rfind_cstr.
- utf-find&replace! utf-string integer utf-string utf-stringprocedure
Implements al_ustr_find_replace.
- utf-find&replace-string! utf-string integer string stringprocedure
Implements al_ustr_find_replace_cstr.
- utf-equal? utf-string utf-stringprocedure
Implements al_ustr_equal.
- utf-compare utf-string utf-stringprocedure
Implements al_ustr_compare.
- utf-ncompare utf-string utf-string integerprocedure
Implements al_ustr_ncompare.
- utf-prefix? utf-string utf-stringprocedure
Implements al_ustr_has_prefix.
- utf-prefix-string? utf-string stringprocedure
Implements al_ustr_has_prefix_cstr.
- utf-suffix? utf-string utf-stringprocedure
Implements al_ustr_has_prefix.
- utf-suffix-string? utf-string stringprocedure
Implements al_ustr_has_suffix_cstr.
- utf8-width integer32procedure
Implements al_utf8_width.
- utf8-encode! blob integer32procedure
Implements al_utf8_encode.
- utf-string-utf16-size utf-stringprocedure
Implements al_ustr_size_utf16.
- utf-string-utf16-encode utf-string blob integerprocedure
Implements al_ustr_encode_utf16.
- utf16-width integerprocedure
Implements al_utf16_width.
- utf16-encode u16vector integer32procedure
Implements al_utf16_encode.
Input
Constants
- joystick-max-axes
- jostick-max-sticks
- joystick-max-buttons
- mouse-max-extra-axis
Enums
cursor-type
- cursor-type->int cursor-typeprocedure
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
- int->cursor-type integerprocedure
joystick-flag
- joystick-flag->int joystick-flagprocedure
joystick-flag may be one of the following symbols:
- digital
- analog
- int->joystick-flag integerprocedure
key
- key->int keyprocedure
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
- int->key integerprocedure
keymod
- keymod->int keymodprocedure
keymod may be one of the following symbols:
- shift
- ctrl
- alt
- lwin
- rwin
- menu
- altgr
- command
- scrolllock
- numlock
- capslock
- inaltseq
- accent1
- accent2
- accent3
- accent4
- int->keymod integerprocedure
Records
cursor
- cursorrecord
joystick
- joystickrecord
joystick-state
- joystick-staterecord
- make-joystick-state*procedure
- make-joystick-stateprocedure
- free-joystick-state! joystick-stateprocedure
- joystick-state-button intprocedure
keyboard
- keyboardrecord
keyboard-state
- keyboard-staterecord
- make-keyboard-state*procedure
- make-keyboard-stateprocedure
- free-keyboard-state! keyboard-stateprocedure
- keyboard-state-displayprocedure
mouse
- mouserecord
mouse-cursor
- mouse-cursorrecord
mouse-state
- mouse-staterecord
- make-mouse-stateprocedure
- make-mouse-state*procedure
- free-mouse-state! mouse-stateprocedure
- mouse-state-x mouse-stateprocedure
- mouse-state-y mouse-stateprocedure
- mouse-state-z mouse-stateprocedure
- mouse-state-w mouse-stateprocedure
- mouse-state-buttons mouse-stateprocedure
- mouse-state-pressure mouse-stateprocedure
- mouse-state-axis mouse-state integerprocedure
- mouse-state-display mouse-stateprocedure
Functions
Joystick
- joystick-addon-installprocedure
Implements al_install_joystick.
- joystick-addon-uninstallprocedure
Implements al_uninstall_joystick.
<procedure>(joystick-addon-installed?)<procedure>
Implements al_is_joystick_installed.
- joystick-addon-reconfigureprocedure
Implements al_reconfigure_joysticks.
<procedure>(joystick-event-source)<procedure>
Implements al_get_joystick_event_source.
- joystick-countprocedure
Implements al_get_num_joysticks.
- joystick-ref integerprocedure
Implements al_get_joystick.
- joystick-release joystickprocedure
Implements al_release_joystick.
- joystick-active? joystickprocedure
Implements al_get_joystick_active.
- joystick-name joystickprocedure
Implements al_get_joystick_name.
- (joystick-axes-count joystick (integer stick))procedure
Implements al_get_joystick_num_axes.
- joystick-button-count joystickprocedure
Implements al_get_joystick_num_buttons.
- (joystick-button-name joystick (integer button))procedure
Implements al_get_joystick_button_name.
- joystick-state-init! joystick-state joystickprocedure
Implements al_get_joystick_state.
- (joystick-state-axis joystick-state (integer stick) (integer axis))procedure
Retrieves desired axis value for a particular stick; #f if either stick or axis is out of available bounds.
Keyboard
- keyboard-addon-installed?procedure
Implements al_is_keyboard_installed.
- keyboard-addon-installprocedure
Implements al_install_keyboard.
- keyboard-addon-uninstallprocedure
Implements al_uninstall_keyboard.
- keycode->string keyprocedure
Implements al_keycode_to_name. Not strictly necessary, since the enums are symbols which can easily be converted to strings.
- keyboard-event-sourceprocedure
Implements al_get_keyboard_event_source.
- keyboard-led-set! integerprocedure
Implements al_set_keyboard_leds.
- keyboard-state-init! keyboard-stateprocedure
Implements al_get_keyboard_state.
- keyboard-state-key-down? keyboard-state keyprocedure
Implements al_key_down.
- keyboard-three-finger-flag?procedure
Wraps _al_three_finger_flag.
- keyboard-led-flag?procedure
Wraps _al_key_led_flag.
Mouse
- mouse-addon-installed?procedure
Implements al_is_mouse_installed.
- mouse-addon-installprocedure
Implements al_install_mouse.
- mouse-addon-uninstallprocedure
Implements al_uninstall_mouse.
- mouse-button-countprocedure
Implements al_get_mouse_num_buttons.
- mouse-axes-countprocedure
Implements al_get_mouse_num_axes.
- (mouse-xy-set! display (integer x) (integer y))procedure
Implements al_set_mouse_xy.
- mouse-z-set! display integerprocedure
Implements al_set_mouse_z.
- mouse-w-set! display integerprocedure
Implements al_set_mouse_w.
- mouse-event-sourceprocedure
Implements al_get_mouse_event_source.
<procedure>(mouse-state-init! mouse-state)</procedure.
Implements al_get_mouse_state.
- (mouse-state-button-down mouse-state (integer button))procedure
Implements al_mouse_button_down.
- (mouse-state-axis mouse-state (integer axis))procedure
Implements al_get_mouse_state_axis.
- (mouse-axis-set! (integer axis) (integer value))procedure
Implements al_set_mouse_axis.
- (make-cursor* (bitmap sprite) (integer xfocus) (integer yfocus))procedure
Implements al_create_mouse_cursor.
- (make-cursor (bitmap sprite) (integer xfocus) (integer yfocus))procedure
Implements al_create_mouse_cursor, with (free-cursor!) declared as a finalizer.
- free-cursor! cursorprocedure
Implements al_destroy_mouse_cursor.
- mouse-cursor-positionprocedure
Returns a 2-element list consisting of the x and y position of the mouse cursor.
- mouse-ungrabprocedure
Implements al_ungrab_mouse.
- display-grab-mouse! displayprocedure
Implements al_grab_mouse.
- display-cursor-set! display mouse-cursorprocedure
Implements al_set_mouse_cursor.
- display-hide-cursor! displayprocedure
Implements al_hide_mouse_cursor.
- display-system-mouse-cursor-set! display cursor-typeprocedure
Implements al_set_system_mouse_cursor.
Math
Functions
Fixed Math
- fix-to-rad integerprocedure
Implements al_fixtorad_r.
- rad-to-fix integerprocedure
Implements al_radtofix_r.
- fixed-sqrt integerprocedure
Implements al_fixsqrt.
- fixed-hypot integerprocedure
Implements al_fixhypot.
- fixed-atan integerprocedure
Implements al_fixatan.
- fixed-atan2 integerprocedure
Implements al_fixatan2.
- fixed-cos integerprocedure
Wraps _al_fix_cos_tbl.
- fixed-tan integerprocedure
Wraps _al_fix_tan_tbl.
- fixed-acos integerprocedure
Wraps _al_fix_acos_tbl.
Memory
Records
memory-interface
- memory-interfacerecord
- make-memory-interface*procedure
- make-memory-interfaceprocedure
- free-memory-interface! memory-interfaceprocedure
- memory-interface-malloc memory-interfaceprocedure
- (memory-interface-malloc-set! memory-interface (function c-pointer (integer32 integer (const c-string) (const c-string))))setter
- memory-interface-realloc memory-interfaceprocedure
- (memory-interface-realloc-set! memory-interface (function void (c-pointer integer (const c-string) (const c-string))))setter
- memory-interface-calloc memory-interfaceprocedure
- (memory-interface-calloc-set! memory-interface (function c-pointer (c-pointer integer32 integer (const c-string) (const c-string))))setter
- memory-interface-free memory-interfaceprocedure
- (memory-interface-free-set! memory-interface (function c-pointer (integer32 integer32 integer (const c-string) (const c-string))))setter
Functions
Memory
- memory-interface-set! memory-interfaceprocedure
Implements al_set_memory_interface.
- malloc* integerprocedure
Implements al_malloc.
- malloc integerprocedure
Implements al_malloc, with (free!) declared as a finalizer.
- free! ptrprocedure
Implements al_free.
- realloc* ptr integerprocedure
Implements al_realloc.
- realloc ptr integerprocedure
Implements al_realloc, with (free!) declared as a finalizer.
- calloc* integer integerprocedure
Implements al_calloc.
- calloc integer integerprocedure
Implements al_calloc, with (free!) declared as a finalizer.
- (malloc/context* (int size) (int line) (string file) (string function))procedure
Implements al_malloc_with_context.
- (malloc/context (int size) (int line) (string file) (string function))procedure
Implements al_malloc_with_context, with (free/context!) declared as a finalizer.
- (free/context! ptr (int line) (string file) (string function))procedure
Implements al_free_with_context.
- (realloc/context* ptr (int size) (int line) (string file) (string function))procedure
Implements al_realloc_with_context.
- (realloc/context ptr (int size) (int line) (string file) (string function))procedure
Implements al_realloc_with_context, with (free/context!) declared as a finalizer.
- (calloc/context* (int count) (int size) (int line) (string file) (string function))procedure
Implements al_calloc_with_context.
- (calloc/context (int count) (int size) (int line) (string file) (string function))procedure
Implements al_calloc_with_context, with (free/context!) declared as a finalizer.
Memory Files
- (open-memfile* (c-pointer mem) (unsigned-integer size) (string mode))procedure
Implements al_open_memfile.
- (open-memfile (c-pointer mem) (unsigned-integer size) (string mode))procedure
Implements al_open_memfile, with (free&close-file!) declared as a finalizer.
- memfile-versionprocedure
Implements al_get_allegro_memfile_version.
Miscellaneous
- combine-flags converter flagsprocedure
For combining enum flags together, ie:
(combine-flags display-flag->int '(windowed opengl resizable generate-expose-events))
- make-id a b c dprocedure
Implements AL_ID.
- (run-main argc argv (function integer (integer (c-pointer c-string))))procedure
Implements al_run_main.
- init-everythingprocedure
Initializes all sub-systems.
- init-symbol sprocedure
Initializes sub-systems by symbol-name. Valid symbols are: allegro, audio, font, image, joystick, keyboard, mouse, primitives, and ttf.
- init-this argprocedure
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))
- uninstall-everythingprocedure
Attempts to uninitialize all loaded sub-systems.
- uninstall-this argprocedure
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
- state-flag->int state-flagprocedure
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
- int->state-flag integerprocedure
system-path
- system-path->int system-pathprocedure
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
- conditionrecord
driver
- driverrecord
- free-driver!procedure
- driver-id driverprocedure
- driver-ptr driverprocedure
- driver-autodetect driverprocedure
mutex
- mutexrecord
state
- staterecord
- make-state*procedure
- make-stateprocedure
- free-state! stateprocedure
system
- systemrecord
thread
- threadrecord
timer
- timerrecord
timeout
- timeoutrecord
- make-timeout*procedure
- make-timeoutprocedure
- free-timeout! timeoutprocedure
version
- versionrecord
- version-major versionprocedure
- version-sub versionprocedure
- version-wip versionprocedure
- version-release-number versionprocedure
- version-string versionprocedure
- version-date-string versionprocedure
- version-date versionprocedure
- version-int versionprocedure
Functions
System
- initprocedure
Implements al_init.
- inhibit-screensaver boolprocedure
Implements al_inhibit_screensaver.
- org-nameprocedure
Implements al_get_org_name.
- org-name-set! stringsetter
Implements al_set_org_name.
- app-nameprocedure
Implements al_get_app_name.
<setter>(app-name-set! string)</procedure>
Implements al_set_app_name.
- system-addon-uninstallprocedure
Implements al_uninstall_system.
- system-addon-installed?procedure
Implements al_is_system_installed.
- system-driverprocedure
Implements al_get_system_driver.
- system-configprocedure
Implements al_get_system_config.
- standard-path system-pathprocedure
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.
- (make-thread* (function c-pointer (thread c-pointer)) c-pointer)procedure
Implements al_create_thread.
- (make-thread (function c-pointer (thread c-pointer)) c-pointer)procedure
Implements al_create_thread, with (free-thread!) declared as a finalizer.
- free-thread! threadprocedure
Implements al_destroy_thread.
<proceudre>(run-detached-thread (function c-pointer (c-pointer)) c-pointer)</procedure>
Implements al_run_detached_thread.
- thread-start! threadprocedure
Implements al_start_thread.
- (thread-join! thread ((c-pointer c-pointer) ret_value))procedure
Implements al_join_thread.
- thread-should-stop? threadprocedure
Implements al_get_thread_should_stop.
- thread-should-stop-set! threadsetter
Implements al_set_thread_should_stop.
- make-mutex*procedure
Implements al_create_mutex.
- make-mutexprocedure
Implements al_create_mutex, with (free-mutex!) declared as a finalizer.
- free-mutex! mutexprocedure
Implements al_destroy_mutex.
- make-mutex-recursive*procedure
Implements al_create_mutex_recursive.
- make-mutex-recursiveprocedure
Implements al_create_mutex_recursive, with (free-mutex!) declared as a finalizer.
- mutex-lock! mutexprocedure
Implements al_lock_mutex.
- mutex-unlock! mutexprocedure
Implements al_unlock_mutex.
- make-condition*procedure
Implements al_create_cond.
- make-conditionprocedure
Implements al_create_cond, with (free-condition!) declared as a finalizer.
- free-condition! conditionprocedure
Implements al_destroy_cond.
- condition-wait condition mutexprocedure
Implements al_wait_cond.
- condition-wait-until condition mutex timeoutprocedure
Implements al_wait_cond_until.
- condition-broadcast conditionprocedure
Implements al_broadcast_cond.
- condition-signal conditionprocedure
Implements al_signal_cond.
Thread Local Storage
- state-store! state state-flagprocedure
Implements al_store_state.
- state-restore stateprocedure
Implements al_restore_state.
Time
- current-timeprocedure
Implements al_get_time.
- rest doubleprocedure
Implements al_rest.
- timeout-init! timeout doubleprocedure
Implements al_init_timeout.
Timer
- make-timer* doubleprocedure
Implements al_create_timer.
- make-timer doubleprocedure
Implements al_create_timer, with (free-timer!) declared as a finalizer.
- free-timer! timerprocedure
Implements al_destroy_timer.
- usec->sec doubleprocedure
Implements ALLEGRO_USECS_TO_SECS.
- msec->sec doubleprocedure
Implements ALLEGRO_MSECS_TO_SECS.
- bps->sec doubleprocedure
Implements ALLEGRO_BPS_TO_SECS.
- bpm->sec doubleprocedure
Implements ALLEGRO_BPM_TO_SECS.
- timer-start! timerprocedure
Implements al_start_timer.
- timer-stop! timerprocedure
Implements al_stop_timer.
- timer-started? timerprocedure
Implements al_get_timer_started.
- timer-speed timerprocedure
Implements al_get_timer_speed.
<setter>(timer-speed-set! timer double)</procedure>
Implements al_set_timer_speed.
- timer-count timerprocedure
Implements al_get_timer_count.
<setter>(timer-count-set! timer integer)</procedure>
Implements al_set_timer_count.
- timer-count-add! timer integerprocedure
Implements al_add_timer_count.
- timer-source timerprocedure
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.