[[tags: allegro game]]
== allegro
This document pertains to system related functions found in the Allegro egg.
Please see the main [allegro] wiki page for more information.
[[toc:]]
== Constants
* build-version
* pi
== Enums
=== state-flag
(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
(int->state-flag integer)
=== system-path
(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
condition
=== driver
driver
(free-driver!)
(driver-id driver)
(driver-ptr driver)
(driver-autodetect driver)
=== mutex
mutex
=== state
state
(make-state*)
(make-state)
(free-state! state)
=== system
system
=== thread
thread
=== timer
timer
=== timeout
timeout
(make-timeout*)
(make-timeout)
(free-timeout! timeout)
=== version
version
(version-major version)
(version-sub version)
(version-wip version)
(version-release-number version)
(version-string version)
(version-date-string version)
(version-date version)
(version-int version)
== Functions
=== System
(init)
Implements al_init.
(inhibit-screensaver bool)
Implements al_inhibit_screensaver.
(org-name)
Implements al_get_org_name.
(org-name-set! string)
Implements al_set_org_name.
(app-name)
Implements al_get_app_name.
(app-name-set! string)
Implements al_set_app_name.
(system-addon-uninstall)
Implements al_uninstall_system.
(system-addon-installed?)
Implements al_is_system_installed.
(system-driver)
Implements al_get_system_driver.
(system-config)
Implements al_get_system_config.
(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.
(make-thread* (function c-pointer (thread c-pointer)) c-pointer)
Implements al_create_thread.
(make-thread (function c-pointer (thread c-pointer)) c-pointer)
Implements al_create_thread, with (free-thread!) declared as a finalizer.
(free-thread! thread)
Implements al_destroy_thread.
(run-detached-thread (function c-pointer (c-pointer)) c-pointer)
Implements al_run_detached_thread.
(thread-start! thread)
Implements al_start_thread.
(thread-join! thread ((c-pointer c-pointer) ret_value))
Implements al_join_thread.
(thread-should-stop? thread)
Implements al_get_thread_should_stop.
(thread-should-stop-set! thread)
Implements al_set_thread_should_stop.
(make-mutex*)
Implements al_create_mutex.
(make-mutex)
Implements al_create_mutex, with (free-mutex!) declared as a finalizer.
(free-mutex! mutex)
Implements al_destroy_mutex.
(make-mutex-recursive*)
Implements al_create_mutex_recursive.
(make-mutex-recursive)
Implements al_create_mutex_recursive, with (free-mutex!) declared as a finalizer.
(mutex-lock! mutex)
Implements al_lock_mutex.
(mutex-unlock! mutex)
Implements al_unlock_mutex.
(make-condition*)
Implements al_create_cond.
(make-condition)
Implements al_create_cond, with (free-condition!) declared as a finalizer.
(free-condition! condition)
Implements al_destroy_cond.
(condition-wait condition mutex)
Implements al_wait_cond.
(condition-wait-until condition mutex timeout)
Implements al_wait_cond_until.
(condition-broadcast condition)
Implements al_broadcast_cond.
(condition-signal condition)
Implements al_signal_cond.
=== Thread Local Storage
(state-store! state state-flag)
Implements al_store_state.
(state-restore state)
Implements al_restore_state.
=== Time
(current-time)
Implements al_get_time.
(rest double)
Implements al_rest.
(timeout-init! timeout double)
Implements al_init_timeout.
=== Timer
(make-timer* double)
Implements al_create_timer.
(make-timer double)
Implements al_create_timer, with (free-timer!) declared as a finalizer.
(free-timer! timer)
Implements al_destroy_timer.
(usec->sec double)
Implements ALLEGRO_USECS_TO_SECS.
(msec->sec double)
Implements ALLEGRO_MSECS_TO_SECS.
(bps->sec double)
Implements ALLEGRO_BPS_TO_SECS.
(bpm->sec double)
Implements ALLEGRO_BPM_TO_SECS.
(timer-start! timer)
Implements al_start_timer.
(timer-stop! timer)
Implements al_stop_timer.
(timer-started? timer)
Implements al_get_timer_started.
(timer-speed timer)
Implements al_get_timer_speed.
(timer-speed-set! timer double)
Implements al_set_timer_speed.
(timer-count timer)
Implements al_get_timer_count.
(timer-count-set! timer integer)
Implements al_set_timer_count.
(timer-count-add! timer integer)
Implements al_add_timer_count.
(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.