Outdated egg!

This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for the CHICKEN 5 version of this egg, if it exists.

If it does not exist, there may be equivalent functionality provided by another egg; have a look at the egg index. Otherwise, please consider porting this egg to the current version of CHICKEN.

allegro

This document pertains to system related functions found in the Allegro egg.

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

  1. Outdated egg!
  2. allegro
  3. Constants
  4. Enums
    1. state-flag
    2. system-path
  5. Records
    1. condition
    2. driver
    3. mutex
    4. state
    5. system
    6. thread
    7. timer
    8. timeout
    9. version
  6. Functions
    1. System
    2. Threads
    3. Thread Local Storage
    4. Time
    5. Timer
    6. C Utilities
      1. (make-c-string-list obj)

Constants

Enums

state-flag

[procedure] (state-flag->int state-flag)

state-flag may be one of the following symbols:

[procedure] (int->state-flag integer)

system-path

[procedure] (system-path->int system-path)

system-path may be one of the following symbols:

Records

condition

[record] condition

driver

[record] driver
[procedure] (free-driver!)
[procedure] (driver-id driver)
[procedure] (driver-ptr driver)
[procedure] (driver-autodetect driver)

mutex

[record] mutex

state

[record] state
[procedure] (make-state*)
[procedure] (make-state)
[procedure] (free-state! state)

system

[record] system

thread

[record] thread

timer

[record] timer

timeout

[record] timeout
[procedure] (make-timeout*)
[procedure] (make-timeout)
[procedure] (free-timeout! timeout)

version

[record] version
[procedure] (version-major version)
[procedure] (version-sub version)
[procedure] (version-wip version)
[procedure] (version-release-number version)
[procedure] (version-string version)
[procedure] (version-date-string version)
[procedure] (version-date version)
[procedure] (version-int version)

Functions

System

[procedure] (init)

Implements al_init.

[procedure] (inhibit-screensaver bool)

Implements al_inhibit_screensaver.

[procedure] (org-name)

Implements al_get_org_name.

[setter] (org-name-set! string)

Implements al_set_org_name.

[procedure] (app-name)

Implements al_get_app_name.

<setter>(app-name-set! string)</procedure>

Implements al_set_app_name.

[procedure] (system-addon-uninstall)

Implements al_uninstall_system.

[procedure] (system-addon-installed?)

Implements al_is_system_installed.

[procedure] (system-driver)

Implements al_get_system_driver.

[procedure] (system-config)

Implements al_get_system_config.

[procedure] (standard-path system-path)

Implements al_get_standard_path.

Threads

WARNING: Untested, may not interact well with Chicken.

Please, please tell me about your successes and workarounds. I'll fix the egg as called for.

[procedure] (make-thread* (function c-pointer (thread c-pointer)) c-pointer)

Implements al_create_thread.

[procedure] (make-thread (function c-pointer (thread c-pointer)) c-pointer)

Implements al_create_thread, with (free-thread!) declared as a finalizer.

[procedure] (free-thread! thread)

Implements al_destroy_thread.

<proceudre>(run-detached-thread (function c-pointer (c-pointer)) c-pointer)</procedure>

Implements al_run_detached_thread.

[procedure] (thread-start! thread)

Implements al_start_thread.

[procedure] (thread-join! thread ((c-pointer c-pointer) ret_value))

Implements al_join_thread.

[procedure] (thread-should-stop? thread)

Implements al_get_thread_should_stop.

[setter] (thread-should-stop-set! thread)

Implements al_set_thread_should_stop.

[procedure] (make-mutex*)

Implements al_create_mutex.

[procedure] (make-mutex)

Implements al_create_mutex, with (free-mutex!) declared as a finalizer.

[procedure] (free-mutex! mutex)

Implements al_destroy_mutex.

[procedure] (make-mutex-recursive*)

Implements al_create_mutex_recursive.

[procedure] (make-mutex-recursive)

Implements al_create_mutex_recursive, with (free-mutex!) declared as a finalizer.

[procedure] (mutex-lock! mutex)

Implements al_lock_mutex.

[procedure] (mutex-unlock! mutex)

Implements al_unlock_mutex.

[procedure] (make-condition*)

Implements al_create_cond.

[procedure] (make-condition)

Implements al_create_cond, with (free-condition!) declared as a finalizer.

[procedure] (free-condition! condition)

Implements al_destroy_cond.

[procedure] (condition-wait condition mutex)

Implements al_wait_cond.

[procedure] (condition-wait-until condition mutex timeout)

Implements al_wait_cond_until.

[procedure] (condition-broadcast condition)

Implements al_broadcast_cond.

[procedure] (condition-signal condition)

Implements al_signal_cond.

Thread Local Storage

[procedure] (state-store! state state-flag)

Implements al_store_state.

[procedure] (state-restore state)

Implements al_restore_state.

Time

[procedure] (current-time)

Implements al_get_time.

[procedure] (rest double)

Implements al_rest.

[procedure] (timeout-init! timeout double)

Implements al_init_timeout.

Timer

[procedure] (make-timer* double)

Implements al_create_timer.

[procedure] (make-timer double)

Implements al_create_timer, with (free-timer!) declared as a finalizer.

[procedure] (free-timer! timer)

Implements al_destroy_timer.

[procedure] (usec->sec double)

Implements ALLEGRO_USECS_TO_SECS.

[procedure] (msec->sec double)

Implements ALLEGRO_MSECS_TO_SECS.

[procedure] (bps->sec double)

Implements ALLEGRO_BPS_TO_SECS.

[procedure] (bpm->sec double)

Implements ALLEGRO_BPM_TO_SECS.

[procedure] (timer-start! timer)

Implements al_start_timer.

[procedure] (timer-stop! timer)

Implements al_stop_timer.

[procedure] (timer-started? timer)

Implements al_get_timer_started.

[procedure] (timer-speed timer)

Implements al_get_timer_speed.

<setter>(timer-speed-set! timer double)</procedure>

Implements al_set_timer_speed.

[procedure] (timer-count timer)

Implements al_get_timer_count.

<setter>(timer-count-set! timer integer)</procedure>

Implements al_set_timer_count.

[procedure] (timer-count-add! timer integer)

Implements al_add_timer_count.

[procedure] (timer-source timer)

Implements al_get_timer_event_source.

C Utilities

Found in the allegro-c-util module.

(make-c-string-list obj)

The obj parameter can either be a single string or list of strings. Returns a managed pointer to a NULL-terminated (char **) list suitable for use with GL extension methods.