Types and constants
Abstract types
Audio
Aggregation types
Enumerations and flags
module Flip : sig ... endmodule Text : sig ... endEvents
module Event : sig ... endDisplays
Display creation
val create_display : int -> int -> displayval destroy_display : display -> unitval get_new_display_flags : unit -> intval set_new_display_flags : int -> unitDisplay operations
val flip_display : unit -> unitDisplay size and position
val get_display_width : display -> intval get_display_height : display -> intval resize_display : display -> int -> int -> boolval acknowledge_resize : display -> unitval get_window_position : display -> int * intval set_window_position : display -> int -> int -> unitval get_window_constraints : display -> int * int * int * intval set_window_constraints : display -> int -> int -> int -> int -> unitval apply_window_constraints : display -> bool -> unitval get_display_adapter : display -> intDisplay settings
val set_window_title : display -> string -> unitval set_new_window_title : string -> unitval get_new_window_title : unit -> stringFullscreen modes
val get_num_display_modes : unit -> intEvents
Event queue contents
Graphics routines
Colors
val map_rgb : int -> int -> int -> colorval map_rgba : int -> int -> int -> int -> colorval premul_rgba : int -> int -> int -> int -> colorval map_rgb_f : float -> float -> float -> colorval map_rgba_f : float -> float -> float -> float -> colorval premul_rgba_f : float -> float -> float -> float -> colorval unmap_rgb : color -> int * int * intval unmap_rgba : color -> int * int * int * intval unmap_rgb_f : color -> float * float * floatval unmap_rgba_f : color -> float * float * float * floatBitmap creation
val create_bitmap : int -> int -> bitmapval create_sub_bitmap : bitmap -> int -> int -> int -> int -> bitmapval convert_bitmap : bitmap -> unitval convert_memory_bitmaps : unit -> unitval destroy_bitmap : bitmap -> unitBitmap properties
val get_bitmap_width : bitmap -> intval get_bitmap_height : bitmap -> intval is_compatible_bitmap : bitmap -> boolval is_sub_bitmap : bitmap -> boolval get_bitmap_x : bitmap -> intval get_bitmap_y : bitmap -> intval reparent_bitmap : bitmap -> bitmap -> int -> int -> int -> intDrawing operations
val clear_to_color : color -> unitval draw_rotated_bitmap :
bitmap ->
?tint:color ->
pos ->
pos ->
float ->
int ->
unitval put_pixel : int -> int -> color -> unitval put_blended_pixel : int -> int -> color -> unitTarget bitmap
val get_target_bitmap : unit -> bitmapval set_target_bitmap : bitmap -> unitval set_target_backbuffer : display -> unitval get_current_display : unit -> displayDeferred drawing
val hold_bitmap_drawing : bool -> unitval is_bitmap_drawing_held : unit -> boolImage I/O
val register_bitmap_loader :
string ->
(string -> int -> bitmap option) option ->
unitval register_bitmap_saver : string -> (string -> bitmap -> bool) option -> unitval load_bitmap : string -> bitmapval load_bitmap_flags : string -> int -> bitmapval save_bitmap : string -> bitmap -> unitval identify_bitmap : string -> stringJoystick routines
val install_joystick : unit -> unitval is_joystick_installed : unit -> boolval uninstall_joystick : unit -> unitval get_num_joysticks : unit -> intval get_joystick_active : joystick -> boolval get_joystick_name : joystick -> stringval get_joystick_stick_name : joystick -> int -> string optionval get_joystick_axis_name : joystick -> int -> int -> string optionval is_joystick_stick_analogue : joystick -> int -> boolval get_joystick_num_sticks : joystick -> intval get_joystick_num_axes : joystick -> int -> intKeyboard routines
val install_keyboard : unit -> unitval is_keyboard_installed : unit -> boolval uninstall_keyboard : unit -> unitval keycode_to_name : Key.t -> stringval can_set_keyboard_leds : unit -> boolval set_keyboard_leds : int -> unitMouse routines
val install_mouse : unit -> unitval is_mouse_installed : unit -> boolval uninstall_mouse : unit -> unitval get_mouse_num_axis : unit -> intval set_mouse_xy : display -> int -> int -> boolval set_mouse_z : int -> boolval set_mouse_w : int -> boolval set_mouse_axis : int -> int -> boolval set_mouse_wheel_precision : int -> unitval get_mouse_wheel_precision : unit -> intShader routines
val build_shader : shader -> unitval get_shader_log : shader -> stringval use_shader : shader option -> unitval get_current_shader : unit -> shaderval destroy_shader : shader -> unitval set_shader_sampler : string -> bitmap -> int -> unitval set_shader_matrix : string -> transform -> unitval set_shader_int : string -> int -> unitval set_shader_float : string -> float -> unitval set_shader_bool : string -> bool -> unitval set_shader_int_vector : string -> int array array -> unitval set_shader_float_vector : string -> float array array -> unitSystem routines
val uninstall_system : unit -> unitval is_system_installed : unit -> boolval get_allegro_version : unit -> intval set_exe_name : string -> unitval set_app_name : string -> unitval set_org_name : string -> unitval get_app_name : unit -> stringval get_org_name : unit -> stringval get_cpu_count : unit -> intval get_ram_size : unit -> intTime
val get_time : unit -> floatval init_timeout : float -> timeoutTimer
val create_timer : float -> timerval start_timer : timer -> unitval resume_timer : timer -> unitval stop_timer : timer -> unitval get_timer_started : timer -> boolval destroy_timer : timer -> unitval get_timer_count : timer -> int64val set_timer_count : timer -> int64 -> unitval add_timer_count : timer -> int64 -> unitval get_timer_speed : timer -> floatval set_timer_speed : timer -> float -> unitAudio addons
val install_audio : unit -> unitval is_audio_installed : unit -> boolval uninstall_audio : unit -> unitval get_allegro_audio_version : unit -> intSamples
val load_sample : string -> sampleval save_sample : string -> sample -> boolval destroy_sample : sample -> unitval reserve_samples : int -> unitval stop_sample : sample -> unitval stop_samples : unit -> unitAudio streams
val load_audio_stream : string -> int -> int -> audio_streamMixers
val get_default_mixer : unit -> mixerAudio codecs
val init_acodec_addon : unit -> unitval is_acodec_addon_initialized : unit -> boolval get_allegro_acodec_version : unit -> intImage I/O addon
val init_image_addon : unit -> unitval is_image_addon_initialized : unit -> boolval shutdown_image_addon : unit -> unitval get_allegro_image_version : unit -> intFont addons
val init_font_addon : unit -> unitval is_font_addon_initialized : unit -> boolval shutdown_font_addon : unit -> unitval get_allegro_font_version : unit -> intGeneral font routines
val destroy_font : font -> unitval get_font_line_height : font -> intval get_font_ascent : font -> intval get_font_descent : font -> intval get_text_width : font -> string -> intval draw_text : font -> color -> pos -> int -> string -> unitval draw_justified_text :
font ->
color ->
pos ->
float ->
float ->
int ->
string ->
unitval get_text_dimensions : font -> string -> int * int * int * intval get_font_ranges : font -> (int * int) arrayval set_fallback_font : font -> font option -> unitBitmap fonts
val grab_font_from_bitmap : bitmap -> (int * int) array -> fontval load_bitmap_font : string -> fontval load_bitmap_font_flags : string -> int -> fontval create_builtin_font : unit -> fontTTF fonts
val init_ttf_addon : unit -> unitval is_ttf_addon_initialized : unit -> boolval shutdown_ttf_addon : unit -> unitval get_allegro_ttf_version : unit -> intval load_ttf_font : string -> int -> int -> fontval load_ttf_font_stretch : string -> int -> int -> int -> fontPrimitives addon
val init_primitives_addon : unit -> unitval is_primitives_addon_initialized : unit -> boolval shutdown_primitives_addon : unit -> unitval get_allegro_primitives_version : unit -> intHigh level drawing routines
val draw_rectangle : pos -> pos -> color -> float -> unitval draw_filled_rectangle : pos -> pos -> color -> unitval draw_rounded_rectangle : pos -> pos -> pos -> color -> float -> unitval draw_filled_rounded_rectangle : pos -> pos -> pos -> color -> unitval draw_pieslice : pos -> float -> float -> float -> color -> float -> unitval draw_filled_pieslice : pos -> float -> float -> float -> color -> unitval draw_ellipse : pos -> pos -> color -> float -> unitval draw_circle : pos -> float -> color -> float -> unitval draw_filled_circle : pos -> float -> color -> unitval draw_arc : pos -> float -> float -> float -> color -> float -> unitval draw_elliptical_arc :
pos ->
pos ->
float ->
float ->
color ->
float ->
unitval draw_spline : pos array -> color -> float -> unitval draw_ribbon : pos array -> color -> float -> unitPolygon routines
val draw_filled_polygon : pos array -> color -> unitval draw_filled_polygon_with_holes :
pos array ->
pos array list ->
color ->
unit