allegro

This document pertains to event related items found in the Allegro egg.

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

  1. allegro
  2. Enums
    1. event-type
  3. Records
    1. any-event
    2. display-event
    3. event
    4. event-source
    5. event-queue
    6. joystick-event
    7. keyboard-event
    8. mouse-event
    9. timer-event
    10. user-event
  4. Functions

Enums

event-type

[procedure] (event-type->int event-type)

event-type may be one of the following symbols:

[procedure] (int->event-type integer)

Records

any-event

[record] any-event
[procedure] (any-event-type any-event)
[procedure] (any-event-source any-event)
[procedure] (any-event-timestamp any-event)

display-event

[record] display-event
[procedure] (display-event-type display-event)
[procedure] (display-event-source display-event)
[procedure] (display-event-timestamp display-event)
[procedure] (display-event-x display-event)
[procedure] (display-event-y display-event)
[procedure] (display-event-width display-event)
[procedure] (display-event-height display-event)
[procedure] (display-event-orientation display-event)

event

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

event-source

[record] event-source

event-queue

[record] event-queue

joystick-event

[record] joystick-event
[procedure] (joystick-event-type joystick-event)
[procedure] (joystick-event-source joystick-event)
[procedure] (joystick-event-timestamp joystick-event)
[procedure] (joystick-event-id joystick-event)
[procedure] (joystick-event-stick joystick-event)
[procedure] (joystick-event-axis joystick-event)
[procedure] (joystick-event-position joystick-event)
[procedure] (joystick-event-button joystick-event)

keyboard-event

[record] keyboard-event
[procedure] (keyboard-event-type keyboard-event)
[procedure] (keyboard-event-source keyboard-event)
[procedure] (keyboard-event-timestamp keyboard-event)
[procedure] (keyboard-event-display keyboard-event)
[procedure] (keyboard-event-keycode keyboard-event)
[procedure] (keyboard-event-unichar keyboard-event)
[procedure] (keyboard-event-modifiers keyboard-event)
[procedure] (keyboard-event-repeat keyboard-event)

mouse-event

[record] mouse-event
[procedure] (mouse-event-type mouse-event)
[procedure] (mouse-event-source mouse-event)
[procedure] (mouse-event-timestamp mouse-event)
[procedure] (mouse-event-display mouse-event)
[procedure] (mouse-event-x mouse-event)
[procedure] (mouse-event-y mouse-event)
[procedure] (mouse-event-z mouse-event)
[procedure] (mouse-event-w mouse-event)
[procedure] (mouse-event-dx mouse-event)
[procedure] (mouse-event-dy mouse-event)
[procedure] (mouse-event-dz mouse-event)
[procedure] (mouse-event-dw mouse-event)
[procedure] (mouse-event-button mouse-event)
[procedure] (mouse-event-pressure mouse-event)

timer-event

[record] timer-event
[procedure] (timer-event-type timer-event)
[procedure] (timer-event-source timer-event)
[procedure] (timer-event-timestamp timer-event)
[procedure] (timer-event-count timer-event)
[procedure] (timer-event-error timer-event)

user-event

[record] user-event
[procedure] (user-event-type user-event)
[procedure] (user-event-source user-event)
[procedure] (user-event-timestamp user-event)
[procedure] (user-event-data1 user-event)
[setter] (user-event-data1-set! user-event integer)
[procedure] (user-event-data2 user-event)
[setter] (user-event-data2-set! user-event integer)
[procedure] (user-event-data3 user-event)
[setter] (user-event-data3-set! user-event integer)
[procedure] (user-event-data4 user-event)
[setter] (user-event-data4-set! user-event integer)

Functions

[procedure] (user-event-type? integer)

Implements ALLEGRO_EVENT_TYPE_IS_USER.

[procedure] (make-event-type (integer a) (integer b) (integer c) (integer d))

Implements ALLEGRO_GET_EVENT_TYPE.

[procedure] (event-type event)

Returns the type of a given event struct.

[procedure] (event->any-event event)

Converts an event to an any-event.

[procedure] (event->display-event event)

Converts an event to a display-event.

[procedure] (event->joystick-event event)

Converts an event to a joystick-event.

[procedure] (event->keyboard-event event)

Converts an event to a keyboard-event.

[procedure] (event->mouse-event event)

Converts an event to a mouse-event.

[procedure] (event->timer-event event)

Converts an event to a timer-event.

[procedure] (event->user-event event)

Converts an event to a user-event.

[procedure] (user-event-source-init! event-source)

Implements al_init_user_event_source.

[procedure] (free-user-event-source! event-source)

Implements al_destroy_user_event_source.

[procedure] (emit-user-event! event-source event (function void (user-event)))

Implements al_emit_user_event.

[procedure] (user-event-unref! user-event)

Implements al_unref_user_event.

[procedure] (event-source-data event-source)

Implements al_get_event_source_data.

[procedure] (event-source-data-set! event-source integer)

Implements al_set_event_source_data.

[procedure] (make-event-queue*)

Implements al_create_event_queue.

[procedure] (make-event-queue)

Implements al_create_event_queue, with (free-event-queue!) declared as a finalizer.

[procedure] (free-event-queue! event-queue)

Implements al_destroy_event_queue.

[procedure] (event-queue-register-source! event-queue event-source)

Implements al_register_event_source.

[procedure] (event-queue-unregister-source! event-queue event-source)

Implements al_unregister_event_source.

[procedure] (event-queue-empty? event-queue)

Implements al_is_event_queue_empty.

[procedure] (event-queue-next! event-queue event)

Implements al_get_next_event.

[procedure] (event-queue-peek! event-queue event)

Implements al_peek_next_event.

[procedure] (event-queue-drop-next! event-queue)

Implements al_drop_next_event_queue.

[procedure] (event-queue-flush! event-queue)

Implements al_drop_next_event.

[procedure] (event-queue-wait! event-queue event)

Implements al_wait_for_event.

[procedure] (event-queue-timed-wait! event-queue event float)

Implements al_wait_for_event_timed.

[procedure] (event-queue-wait-until! event-queue event timeout)

Implements al_wait_for_event_until.