module Sdl:sig
..end
typeuint8 =
int
typeint16 =
int
typeuint16 =
int
typeuint32 =
int32
typeuint64 =
int64
type('a, 'b)
bigarray =('a, 'b, Bigarray.c_layout) Bigarray.Array1.t
type'a
result =('a, [ `Msg of string ]) Result.result
Tsdl.Sdl.get_error
returned.module Init:sig
..end
val init : Init.t -> unit result
val init_sub_system : Init.t -> unit result
val quit : unit -> unit
val quit_sub_system : Init.t -> unit
val was_init : Init.t option -> Init.t
module Hint:sig
..end
val clear_hints : unit -> unit
val get_hint : Hint.t -> string option
val set_hint : Hint.t -> string -> bool
val set_hint_with_priority : Hint.t -> string -> Hint.priority -> bool
val clear_error : unit -> unit
val get_error : unit -> string
val set_error : ('b, Format.formatter, unit) Pervasives.format -> 'b
module Log:sig
..end
val log : ('b, Format.formatter, unit) Pervasives.format -> 'b
val log_critical : Log.category -> ('b, Format.formatter, unit) Pervasives.format -> 'b
val log_debug : Log.category -> ('b, Format.formatter, unit) Pervasives.format -> 'b
val log_error : Log.category -> ('b, Format.formatter, unit) Pervasives.format -> 'b
val log_get_priority : Log.category -> Log.priority
val log_info : Log.category -> ('b, Format.formatter, unit) Pervasives.format -> 'b
val log_message : Log.category ->
Log.priority -> ('b, Format.formatter, unit) Pervasives.format -> 'b
val log_reset_priorities : unit -> unit
val log_set_all_priority : Log.priority -> unit
val log_set_priority : Log.category -> Log.priority -> unit
val log_verbose : Log.category -> ('b, Format.formatter, unit) Pervasives.format -> 'b
val log_warn : Log.category -> ('b, Format.formatter, unit) Pervasives.format -> 'b
val get_version : unit -> int * int * int
val get_revision : unit -> string
val get_revision_number : unit -> int
type
rw_ops
val rw_from_file : string -> string -> rw_ops result
val rw_close : rw_ops -> unit result
val get_base_path : unit -> string result
val get_pref_path : org:string -> app:string -> string result
type
window
type
color
module Color:sig
..end
type
point
module Point:sig
..end
type
rect
module Rect:sig
..end
val enclose_points : ?clip:rect -> point list -> rect option
None
if all the points were outside
the clipping rectangle (if provided).val enclose_points_ba : ?clip:rect ->
(int32, Bigarray.int32_elt) bigarray -> rect option
Tsdl.Sdl.enclose_points
. Each consecutive pair in the array defines a
point.Invalid_argument
if the length of the array is not
a multiple of 2.val has_intersection : rect -> rect -> bool
val intersect_rect : rect -> rect -> rect option
val intersect_rect_and_line : rect ->
int -> int -> int -> int -> ((int * int) * (int * int)) option
val rect_empty : rect -> bool
val rect_equals : rect -> rect -> bool
val union_rect : rect -> rect -> rect
type
palette
val alloc_palette : int -> palette result
val free_palette : palette -> unit
val get_palette_ncolors : palette -> int
get_palette_ncolors p
is the field ncolors
of p
.val get_palette_colors : palette -> color list
get_palette_colors p
is a copy of the contents of the field colors
of s
.val get_palette_colors_ba : palette -> (int, Bigarray.int8_unsigned_elt) bigarray
get_palette_colors_ba p
is a copy of the contents of the field colors
of p
.val set_palette_colors : palette -> color list -> fst:int -> unit result
val set_palette_colors_ba : palette ->
(int, Bigarray.int8_unsigned_elt) bigarray ->
fst:int -> unit result
Tsdl.Sdl.set_palette_colors
. Each consecutive quadruplet defines a
color. The data is copied.Invalid_argument
if the length of the array is not
a multiple of 4.typegamma_ramp =
(int, Bigarray.int16_unsigned_elt) bigarray
uint16
values.val calculate_gamma_ramp : float -> gamma_ramp
module Blend:sig
..end
module Pixel:sig
..end
type
pixel_format
val alloc_format : Pixel.format_enum -> pixel_format result
val free_format : pixel_format -> unit
val get_pixel_format_name : Pixel.format_enum -> string
val get_pixel_format_format : pixel_format -> Pixel.format_enum
get_pixel_format_bytes_pp pf
is the field format
of pf
.val get_pixel_format_bits_pp : pixel_format -> int
get_pixel_format_bytes_pp pf
is the field BitsPerPixel
of pf
.val get_pixel_format_bytes_pp : pixel_format -> int
get_pixel_format_bytes_pp pf
is the field BytesPerPixel
of pf
.val get_rgb : pixel_format ->
uint32 -> uint8 * uint8 * uint8
val get_rgba : pixel_format ->
uint32 ->
uint8 * uint8 * uint8 * uint8
val map_rgb : pixel_format ->
uint8 -> uint8 -> uint8 -> uint32
val map_rgba : pixel_format ->
uint8 ->
uint8 -> uint8 -> uint8 -> uint32
val masks_to_pixel_format_enum : int ->
uint32 ->
uint32 ->
uint32 -> uint32 -> Pixel.format_enum
val pixel_format_enum_to_masks : Pixel.format_enum ->
(int * uint32 * uint32 * uint32 * uint32)
result
val set_pixel_format_palette : pixel_format -> palette -> unit result
Note If you allocated the palette with Tsdl.Sdl.alloc_palette
you
can Tsdl.Sdl.free_palette
after.
type
surface
val blit_scaled : src:surface ->
rect ->
dst:surface -> rect option -> unit result
val blit_surface : src:surface ->
rect option ->
dst:surface -> rect -> unit result
val convert_pixels : w:int ->
h:int ->
src:Pixel.format_enum ->
('a, 'b) bigarray ->
int ->
dst:Pixel.format_enum ->
('c, 'd) bigarray -> int -> unit result
Note Pitches are given in bigarray elements not in bytes.
Warning. Unsafe, make sure your parameters don't result
in invalid access to memory.
val convert_surface : surface -> pixel_format -> surface result
val convert_surface_format : surface ->
Pixel.format_enum -> surface result
val create_rgb_surface : w:int ->
h:int ->
depth:int ->
uint32 ->
uint32 ->
uint32 -> uint32 -> surface result
val create_rgb_surface_from : ('a, 'b) bigarray ->
w:int ->
h:int ->
depth:int ->
pitch:int ->
uint32 ->
uint32 ->
uint32 -> uint32 -> surface result
Note The pitch is given in bigarray elements not in bytes.
Warning Unsafe, make sure your parameters don't result
in invalid access to memory. The bigarray data is not copied,
it must remain valid until Tsdl.Sdl.free_surface
is called on the
surface.
val fill_rect : surface ->
rect option -> uint32 -> unit result
val fill_rects : surface ->
rect list -> uint32 -> unit result
val fill_rects_ba : surface ->
(int32, Bigarray.int32_elt) bigarray ->
uint32 -> unit result
Tsdl.Sdl.fill_rects
. Each consecutive quadruplet defines a
rectangle.Invalid_argument
if the length of the array is not
a multiple of 4.val free_surface : surface -> unit
val get_clip_rect : surface -> rect
val get_color_key : surface -> uint32 result
val get_surface_alpha_mod : surface -> uint8 result
val get_surface_blend_mode : surface -> Blend.mode result
val get_surface_color_mod : surface -> (int * int * int) result
val get_surface_format_enum : surface -> Pixel.format_enum
get_surface_format_neum s
is the pixel format enum of the
field format
of s
.val get_surface_pitch : surface -> int
get_surface_pitch s
is the field pitch
of s
.val get_surface_pixels : surface -> ('a, 'b) Bigarray.kind -> ('a, 'b) bigarray
get_surface_pixels s kind
is the field pixels
of s
viewed as
a kind
bigarray. Note that you must lock the surface before
accessing this.
Warning. The bigarray memory becomes invalid
once the surface is unlocked or freed.
Raises Invalid_argument
If kind
can't align with the surface pitch.
val get_surface_size : surface -> int * int
get_surface_size s
is the fields w
and h
of s
.val load_bmp : string -> surface result
val load_bmp_rw : rw_ops -> close:bool -> surface result
val lock_surface : surface -> unit result
val lower_blit : src:surface ->
rect ->
dst:surface -> rect -> unit result
val lower_blit_scaled : src:surface ->
rect ->
dst:surface -> rect -> unit result
val save_bmp : surface -> string -> unit result
val save_bmp_rw : surface -> rw_ops -> close:bool -> unit result
val set_clip_rect : surface -> rect -> bool
val set_color_key : surface -> bool -> uint32 -> unit result
val set_surface_alpha_mod : surface -> uint8 -> unit result
val set_surface_blend_mode : surface -> Blend.mode -> unit result
val set_surface_color_mod : surface ->
uint8 -> uint8 -> uint8 -> unit result
val set_surface_palette : surface -> palette -> unit result
Note If you allocated the palette with Tsdl.Sdl.alloc_palette
you
can Tsdl.Sdl.free_palette
after.
val set_surface_rle : surface -> bool -> unit result
val unlock_surface : surface -> unit
type
flip
module Flip:sig
..end
type
texture
type
renderer
module Renderer:sig
..end
type
renderer_info = {
|
ri_name : |
|
ri_flags : |
|
ri_texture_formats : |
|
ri_max_texture_width : |
|
ri_max_texture_height : |
val create_renderer : ?index:int ->
?flags:Renderer.flags ->
window -> renderer result
val create_software_renderer : surface -> renderer result
val destroy_renderer : renderer -> unit
val get_num_render_drivers : unit -> int result
val get_render_draw_blend_mode : renderer -> Blend.mode result
val get_render_draw_color : renderer ->
(uint8 * uint8 * uint8 * uint8)
result
val get_render_driver_info : int -> renderer_info result
val get_render_target : renderer -> texture option
val get_renderer : window -> renderer result
val get_renderer_info : renderer -> renderer_info result
val get_renderer_output_size : renderer -> (int * int) result
val render_clear : renderer -> unit result
val render_copy : ?src:rect ->
?dst:rect ->
renderer -> texture -> unit result
val render_copy_ex : ?src:rect ->
?dst:rect ->
renderer ->
texture ->
float -> point option -> flip -> unit result
val render_draw_line : renderer -> int -> int -> int -> int -> unit result
val render_draw_lines : renderer -> point list -> unit result
val render_draw_lines_ba : renderer ->
(int32, Bigarray.int32_elt) bigarray -> unit result
Tsdl.Sdl.render_draw_lines
. Each consecutive pair in the array
defines a point.Invalid_argument
if the length of the array is not a
multiple of 2.val render_draw_point : renderer -> int -> int -> unit result
val render_draw_points : renderer -> point list -> unit result
val render_draw_points_ba : renderer ->
(int32, Bigarray.int32_elt) bigarray -> unit result
Tsdl.Sdl.render_draw_points
. Each consecutive pair in the array
defines a point.Invalid_argument
if the length of the array is not a
multiple of 2.val render_draw_rect : renderer -> rect option -> unit result
val render_draw_rects : renderer -> rect list -> unit result
val render_draw_rects_ba : renderer ->
(int32, Bigarray.int32_elt) bigarray -> unit result
Tsdl.Sdl.render_draw_rects
. Each consecutive quadruple in the array
defines a rectangle.Invalid_argument
if the length of the array is not a
multiple of 4.val render_fill_rect : renderer -> rect option -> unit result
val render_fill_rects : renderer -> rect list -> unit result
val render_fill_rects_ba : renderer ->
(int32, Bigarray.int32_elt) bigarray -> unit result
Tsdl.Sdl.render_draw_rects
. Each consecutive quadruple in the array
defines a rectangle.Invalid_argument
if the length of the array is not a
multiple of 4.val render_get_clip_rect : renderer -> rect
val render_get_logical_size : renderer -> int * int
val render_get_scale : renderer -> float * float
val render_get_viewport : renderer -> rect
val render_present : renderer -> unit
val render_read_pixels : renderer ->
rect option ->
Pixel.format_enum option ->
('a, 'b) bigarray -> int -> unit result
val render_set_clip_rect : renderer -> rect option -> unit result
val render_set_logical_size : renderer -> int -> int -> unit result
val render_set_scale : renderer -> float -> float -> unit result
val render_set_viewport : renderer -> rect option -> unit result
val render_target_supported : renderer -> bool
val set_render_draw_blend_mode : renderer -> Blend.mode -> unit result
val set_render_draw_color : renderer ->
uint8 ->
uint8 -> uint8 -> uint8 -> unit result
val set_render_target : renderer -> texture option -> unit result
module Texture:sig
..end
val create_texture : renderer ->
Pixel.format_enum ->
Texture.access -> w:int -> h:int -> texture result
val create_texture_from_surface : renderer -> surface -> texture result
val destroy_texture : texture -> unit
val get_texture_alpha_mod : texture -> uint8 result
val get_texture_blend_mode : texture -> Blend.mode result
val get_texture_color_mod : texture ->
(uint8 * uint8 * uint8) result
val lock_texture : texture ->
rect option ->
('a, 'b) Bigarray.kind -> (('a, 'b) bigarray * int) result
Note. The returned pitch is in bigarray element, not in bytes.
Raises Invalid_argument
If kind
can't align with the texture pitch.
val query_texture : texture ->
(Pixel.format_enum * Texture.access * (int * int))
result
val set_texture_alpha_mod : texture -> uint8 -> unit result
val set_texture_blend_mode : texture -> Blend.mode -> unit result
val set_texture_color_mod : texture ->
uint8 -> uint8 -> uint8 -> unit result
val unlock_texture : texture -> unit
val update_texture : texture ->
rect option ->
('a, 'b) bigarray -> int -> unit result
Note The pitch is given in bigarray elements not in
bytes.
val update_yuv_texture : texture ->
rect option ->
y:(int, Bigarray.int8_unsigned_elt) bigarray ->
int ->
u:(int, Bigarray.int8_unsigned_elt) bigarray ->
int ->
v:(int, Bigarray.int8_unsigned_elt) bigarray ->
int -> unit result
val get_current_video_driver : unit -> string option
val get_num_video_drivers : unit -> int result
val get_video_driver : int -> string result
val video_init : string option -> unit result
val video_quit : unit -> unit
type
driverdata
type
display_mode = {
|
dm_format : |
|
dm_w : |
|
dm_h : |
|
dm_refresh_rate : |
|
dm_driverdata : |
val get_closest_display_mode : int -> display_mode -> display_mode option
val get_current_display_mode : int -> display_mode result
val get_desktop_display_mode : int -> display_mode result
val get_display_bounds : int -> rect result
val get_display_mode : int -> int -> display_mode result
val get_display_name : int -> string result
val get_num_display_modes : int -> int result
val get_num_video_displays : unit -> int result
module Window:sig
..end
val create_window : string ->
?x:int ->
?y:int ->
w:int -> h:int -> Window.flags -> window result
x
and y
default to Tsdl.Sdl.Window.pos_undefined
.
val create_window_and_renderer : w:int ->
h:int ->
Window.flags ->
(window * renderer) result
val destroy_window : window -> unit
val get_window_brightness : window -> float
val get_window_display_index : window -> int result
val get_window_display_mode : window -> display_mode result
val get_window_flags : window -> Window.flags
val get_window_from_id : int -> window result
val get_window_gamma_ramp : window ->
(gamma_ramp * gamma_ramp * gamma_ramp)
result
val get_window_grab : window -> bool
val get_window_id : window -> int
val get_window_maximum_size : window -> int * int
val get_window_minimum_size : window -> int * int
val get_window_pixel_format : window -> Pixel.format_enum
val get_window_position : window -> int * int
val get_window_size : window -> int * int
val get_window_surface : window -> surface result
Note. According to SDL's documentation the surface
is freed when the window is destroyed.
val get_window_title : window -> string
val hide_window : window -> unit
val maximize_window : window -> unit
val minimize_window : window -> unit
val raise_window : window -> unit
val restore_window : window -> unit
val set_window_bordered : window -> bool -> unit
val set_window_brightness : window -> float -> unit result
val set_window_display_mode : window -> display_mode -> unit result
val set_window_fullscreen : window -> Window.flags -> unit result
val set_window_gamma_ramp : window ->
gamma_ramp ->
gamma_ramp -> gamma_ramp -> unit result
val set_window_grab : window -> bool -> unit
val set_window_icon : window -> surface -> unit
val set_window_maximum_size : window -> w:int -> h:int -> unit
val set_window_minimum_size : window -> w:int -> h:int -> unit
val set_window_position : window -> x:int -> y:int -> unit
val set_window_size : window -> w:int -> h:int -> unit
val set_window_title : window -> string -> unit
val show_window : window -> unit
val update_window_surface : window -> unit result
val update_window_surface_rects : window -> rect list -> unit result
val update_window_surface_rects_ba : window ->
(int32, Bigarray.int32_elt) bigarray -> unit result
Tsdl.Sdl.update_window_surface_rects
. Each consecutive quadruplet defines a
rectangle.Invalid_argument
if the length of the array is not
a multiple of 4.type
gl_context
module Gl:sig
..end
val gl_create_context : window -> gl_context result
val gl_bind_texture : texture -> (float * float) result
val gl_delete_context : gl_context -> unit
val gl_extension_supported : string -> bool
val gl_get_attribute : Gl.attr -> int result
val gl_get_current_context : unit -> gl_context result
val gl_get_drawable_size : window -> int * int
val gl_get_swap_interval : unit -> int result
val gl_make_current : window -> gl_context -> unit result
val gl_set_attribute : Gl.attr -> int -> unit result
val gl_set_swap_interval : int -> unit result
val gl_swap_window : window -> unit
val gl_reset_attributes : unit -> unit
val gl_unbind_texture : texture -> unit result
val disable_screen_saver : unit -> unit
val enable_screen_saver : unit -> unit
val is_screen_saver_enabled : unit -> bool
module Message_box:sig
..end
val show_message_box : Message_box.data -> int result
val show_simple_message_box : Message_box.flags ->
title:string -> string -> window option -> unit result
val get_clipboard_text : unit -> string result
val has_clipboard_text : unit -> bool
val set_clipboard_text : string -> unit result
val pressed : button_state
val released : button_state
type
toggle_state
val disable : toggle_state
val enable : toggle_state
typescancode =
int
module Scancode:sig
..end
Tsdl.Sdl.scancode
typekeycode =
int
module K:sig
..end
Tsdl.Sdl.keycode
typekeymod =
int
module Kmod:sig
..end
Tsdl.Sdl.keymod
val get_keyboard_focus : unit -> window option
val get_keyboard_state : unit -> (int, Bigarray.int8_unsigned_elt) bigarray
val get_key_from_name : string -> keycode
val get_key_from_scancode : scancode -> keycode
val get_key_name : keycode -> string
val get_mod_state : unit -> keymod
val get_scancode_from_key : keycode -> scancode
val get_scancode_from_name : string -> scancode
val get_scancode_name : scancode -> string
val has_screen_keyboard_support : unit -> bool
val is_screen_keyboard_shown : window -> bool
val is_text_input_active : unit -> bool
val set_mod_state : keymod -> unit
val set_text_input_rect : rect option -> unit
val start_text_input : unit -> unit
val stop_text_input : unit -> unit
type
cursor
module System_cursor:sig
..end
module Button:sig
..end
val create_color_cursor : surface -> hot_x:int -> hot_y:int -> cursor result
val create_cursor : (int, Bigarray.int8_unsigned_elt) bigarray ->
(int, Bigarray.int8_unsigned_elt) bigarray ->
w:int -> h:int -> hot_x:int -> hot_y:int -> cursor result
val create_system_cursor : System_cursor.t -> cursor result
val free_cursor : cursor -> unit
val get_cursor : unit -> cursor option
val get_default_cursor : unit -> cursor option
val get_mouse_focus : unit -> window option
val get_mouse_state : unit -> uint32 * (int * int)
val get_relative_mouse_mode : unit -> bool
val get_relative_mouse_state : unit -> uint32 * (int * int)
val get_cursor_shown : unit -> bool result
val set_cursor : cursor option -> unit
val set_relative_mouse_mode : bool -> unit result
val show_cursor : bool -> bool result
val warp_mouse_in_window : window option -> x:int -> y:int -> unit
typetouch_id =
int64
val touch_mouse_id : touch_id
typegesture_id =
int64
typefinger_id =
int64
type
finger
module Finger:sig
..end
val get_num_touch_devices : unit -> int
val get_num_touch_fingers : touch_id -> int
val get_touch_device : int -> touch_id result
val get_touch_finger : touch_id -> int -> finger option
val load_dollar_templates : touch_id -> rw_ops -> unit result
val record_gesture : touch_id -> unit result
val save_dollar_template : gesture_id -> rw_ops -> unit result
val save_all_dollar_templates : rw_ops -> unit result
type
joystick_guid
typejoystick_id =
int32
type
joystick
module Hat:sig
..end
val joystick_close : joystick -> unit
val joystick_get_event_state : unit -> toggle_state result
val joystick_set_event_state : toggle_state -> toggle_state result
val joystick_get_attached : joystick -> bool
val joystick_get_axis : joystick -> int -> int16
val joystick_get_ball : joystick -> int -> (int * int) result
joystick -> int -> uint8
:
val joystick_get_device_guid : int -> joystick_guid
val joystick_get_guid : joystick -> joystick_guid
val joystick_get_guid_from_string : string -> joystick_guid
val joystick_get_guid_string : joystick_guid -> string
val joystick_get_hat : joystick -> int -> Hat.t
val joystick_instance_id : joystick -> joystick_id result
val joystick_name : joystick -> string result
val joystick_name_for_index : int -> string result
val joystick_num_axes : joystick -> int result
val joystick_num_balls : joystick -> int result
joystick -> int result
:
val joystick_num_hats : joystick -> int result
val joystick_open : int -> joystick result
val joystick_update : unit -> unit
val num_joysticks : unit -> int result
type
game_controller
module Controller:sig
..end
val game_controller_add_mapping : string -> bool result
val game_controller_add_mapping_from_file : string -> int result
val game_controller_add_mapping_from_rw : rw_ops -> bool -> int result
val game_controller_close : game_controller -> unit
val game_controller_get_event_state : unit -> toggle_state result
val game_controller_set_event_state : toggle_state -> toggle_state result
val game_controller_get_attached : game_controller -> bool
val game_controller_get_axis : game_controller -> Controller.axis -> int16
val game_controller_get_axis_from_string : string -> Controller.axis
val game_controller_get_bind_for_axis : game_controller ->
Controller.axis -> Controller.button_bind
game_controller ->
Controller.button -> Controller.button_bind
:
game_controller -> Controller.button -> uint8
:
string -> Controller.button
:
val game_controller_get_joystick : game_controller -> joystick result
val game_controller_get_string_for_axis : Controller.axis -> string option
Controller.button -> string option
:
val game_controller_mapping : game_controller -> string result
val game_controller_mapping_for_guid : joystick_guid -> string result
val game_controller_name : game_controller -> string result
val game_controller_name_for_index : int -> string result
val game_controller_open : int -> game_controller result
val game_controller_update : unit -> unit
val is_game_controller : int -> bool
typeevent_type =
int
type
event
module Event:sig
..end
val get_event_state : event_type -> toggle_state
val set_event_state : event_type -> toggle_state -> unit
val flush_event : event_type -> unit
val flush_events : event_type -> event_type -> unit
val has_event : event_type -> bool
val has_events : event_type -> event_type -> bool
val poll_event : event option -> bool
val pump_events : unit -> unit
val push_event : event -> bool result
val register_event : unit -> event_type option
val wait_event : event option -> unit result
val wait_event_timeout : event option -> int -> bool
type
haptic
type
haptic_effect
type
haptic_effect_id
module Haptic:sig
..end
val haptic_close : haptic -> unit
val haptic_destroy_effect : haptic -> haptic_effect_id -> unit
val haptic_effect_supported : haptic -> haptic_effect -> bool result
val haptic_get_effect_status : haptic -> haptic_effect_id -> bool result
val haptic_index : haptic -> int result
val haptic_name : int -> string result
val haptic_new_effect : haptic ->
haptic_effect -> haptic_effect_id result
val haptic_num_axes : haptic -> int result
val haptic_num_effects : haptic -> int result
val haptic_num_effects_playing : haptic -> int result
val haptic_open : int -> haptic result
val haptic_open_from_joystick : joystick -> haptic result
val haptic_open_from_mouse : unit -> haptic result
val haptic_opened : int -> bool
val haptic_pause : haptic -> unit result
val haptic_query : haptic -> int
val haptic_rumble_init : haptic -> unit result
val haptic_rumble_play : haptic -> float -> uint32 -> unit result
val haptic_rumble_stop : haptic -> unit result
val haptic_rumble_supported : haptic -> bool result
val haptic_run_effect : haptic ->
haptic_effect_id -> uint32 -> unit result
val haptic_set_autocenter : haptic -> int -> unit result
val haptic_set_gain : haptic -> int -> unit result
val haptic_stop_all : haptic -> unit result
val haptic_stop_effect : haptic -> haptic_effect_id -> unit result
val haptic_unpause : haptic -> unit result
val haptic_update_effect : haptic ->
haptic_effect_id -> haptic_effect -> unit result
val joystick_is_haptic : joystick -> bool result
val mouse_is_haptic : unit -> bool result
val num_haptics : unit -> int result
module Audio:sig
..end
val audio_init : string option -> unit result
val audio_quit : unit -> unit
val get_audio_driver : int -> string result
val get_current_audio_driver : unit -> string option
val get_num_audio_drivers : unit -> int result
type
audio_device_id
type ('a, 'b)
audio_spec = {
|
as_freq : |
|
as_format : |
|
as_channels : |
|
as_silence : |
|
as_samples : |
|
as_size : |
|
as_ba_kind : |
Note. The callback is currently not exposed because
of this problem.
val close_audio_device : audio_device_id -> unit
val free_wav : ('a, 'b) bigarray -> unit
val get_audio_device_name : int -> bool -> string result
val get_audio_device_status : audio_device_id -> Audio.status
val get_num_audio_devices : bool -> int result
val load_wav_rw : rw_ops ->
('a, 'b) audio_spec ->
(('a, 'b) audio_spec * ('a, 'b) bigarray) result
val lock_audio_device : audio_device_id -> unit
val open_audio_device : string option ->
bool ->
('a, 'b) audio_spec ->
Audio.allow ->
(audio_device_id * ('a, 'b) audio_spec) result
val pause_audio_device : audio_device_id -> bool -> unit
val unlock_audio_device : audio_device_id -> unit
val delay : uint32 -> unit
val get_ticks : unit -> uint32
val get_performance_counter : unit -> uint64
val get_performance_frequency : unit -> uint64
val get_platform : unit -> string
val get_cpu_cache_line_size : unit -> int result
val get_cpu_count : unit -> int
val get_system_ram : unit -> int
val has_3d_now : unit -> bool
val has_altivec : unit -> bool
val has_avx : unit -> bool
val has_mmx : unit -> bool
val has_rdtsc : unit -> bool
val has_sse : unit -> bool
val has_sse2 : unit -> bool
val has_sse3 : unit -> bool
val has_sse41 : unit -> bool
val has_sse42 : unit -> bool
typepower_state =
[ `Charged | `Charging | `No_battery | `On_battery | `Unknown ]
type
power_info = {
|
pi_state : |
|
pi_secs : |
|
pi_pct : |
val get_power_info : unit -> power_info
Everything except the following functions/categories are available.
void *
type in the interface)void *
type in the interface)