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 user input related methods found in the Allegro egg.
Please see the main [allegro] wiki page for more information.
TOC »
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.