ocamlsdl

Interface between OCaml and SDL
IN THIS PACKAGE
Module Sdlevent
exception Event_exn of string
type active_state =
| MOUSEFOCUS
| INPUTFOCUS
| APPACTIVE
val get_app_state : unit -> active_state list
type active_event = {
gain : bool;
ae_state : active_state list;
}
type switch_state =
| RELEASED
| PRESSED
type keyboard_event = {
ke_which : int;
ke_state : switch_state;
keysym : Sdlkey.t;
keymod : Sdlkey.mod_state;
keycode : char;
unicode : int;
}
type mousemotion_event = {
mme_which : int;
mme_state : Sdlmouse.button list;
mme_x : int;
mme_y : int;
mme_xrel : int;
mme_yrel : int;
}
type mousebutton_event = {
mbe_which : int;
mbe_button : Sdlmouse.button;
mbe_state : switch_state;
mbe_x : int;
mbe_y : int;
}
type joyaxis_event = {
jae_which : int;
jae_axis : int;
jae_value : int;
}
type joyball_event = {
jle_which : int;
jle_ball : int;
jle_xrel : int;
jle_yrel : int;
}
type joyhat_event = {
jhe_which : int;
jhe_hat : int;
jhe_value : int;
}
type joybutton_event = {
jbe_which : int;
jbe_button : int;
jbe_state : switch_state;
}
type event =
| ACTIVE of active_event
| KEYDOWN of keyboard_event
| KEYUP of keyboard_event
| MOUSEMOTION of mousemotion_event
| MOUSEBUTTONDOWN of mousebutton_event
| MOUSEBUTTONUP of mousebutton_event
| JOYAXISMOTION of joyaxis_event
| JOYBALLMOTION of joyball_event
| JOYHATMOTION of joyhat_event
| JOYBUTTONDOWN of joybutton_event
| JOYBUTTONUP of joybutton_event
| QUIT
| SYSWM
| VIDEORESIZE of int * int
| VIDEOEXPOSE
| USER of int
val string_of_event : event -> string
type event_mask = int
val active_mask : event_mask
val keydown_mask : event_mask
val keyup_mask : event_mask
val mousemotion_mask : event_mask
val mousebuttondown_mask : event_mask
val mousebuttonup_mask : event_mask
val joyaxismotion_mask : event_mask
val joyballmotion_mask : event_mask
val joyhatmotion_mask : event_mask
val joybuttondown_mask : event_mask
val joybuttonup_mask : event_mask
val quit_mask : event_mask
val syswmevent_mask : event_mask
val videoresize_mask : event_mask
val videoexpose_mask : event_mask
val userevent_mask : event_mask
val keyboard_event_mask : event_mask
val mouse_event_mask : event_mask
val joystick_event_mask : event_mask
val all_events_mask : event_mask
type event_kind =
| ACTIVE_EVENT
| KEYDOWN_EVENT
| KEYUP_EVENT
| MOUSEMOTION_EVENT
| MOUSEBUTTONDOWN_EVENT
| MOUSEBUTTONUP_EVENT
| JOYAXISMOTION_EVENT
| JOYBALL_EVENT
| JOYHAT_EVENT
| JOYBUTTONDOWN_EVENT
| JOYBUTTONUP_EVENT
| QUIT_EVENT
| SYSWM_EVENT
| RESIZE_EVENT
| EXPOSE_EVENT
| USER_EVENT
val make_mask : event_kind list -> event_mask
val of_mask : event_mask -> event_kind list
val enable_events : event_mask -> unit
val disable_events : event_mask -> unit
val get_enabled_events : unit -> event_mask
val get_state : event_kind -> bool
val set_state : bool -> event_kind -> unit
val pump : unit -> unit
val wait_event : unit -> event
val wait : unit -> unit
val poll : unit -> event option
val has_event : unit -> bool
val peek : ?mask:event_mask -> int -> event list
val get : ?mask:event_mask -> int -> event list
val add : event list -> unit
module Old : sig ... end