sig
type que_dis_ena = QUERY | DISABLE | ENABLE
type off_on = OFF | ON
type pointer
type app_state = APPMOUSEFOCUS | APPINPUTFOCUS | APPACTIVE
val get_app_state : unit -> Sdl.Event.app_state list
type key =
K_UNKNOWN
| K_FIRST
| K_BACKSPACE
| K_TAB
| K_CLEAR
| K_RETURN
| K_PAUSE
| K_ESCAPE
| K_SPACE
| K_EXCLAIM
| K_QUOTEDBL
| K_HASH
| K_DOLLAR
| K_AMPERSAND
| K_QUOTE
| K_LEFTPAREN
| K_RIGHTPAREN
| K_ASTERISK
| K_PLUS
| K_COMMA
| K_MINUS
| K_PERIOD
| K_SLASH
| K_0
| K_1
| K_2
| K_3
| K_4
| K_5
| K_6
| K_7
| K_8
| K_9
| K_COLON
| K_SEMICOLON
| K_LESS
| K_EQUALS
| K_GREATER
| K_QUESTION
| K_AT
| K_LEFTBRACKET
| K_BACKSLASH
| K_RIGHTBRACKET
| K_CARET
| K_UNDERSCORE
| K_BACKQUOTE
| K_A
| K_B
| K_C
| K_D
| K_E
| K_F
| K_G
| K_H
| K_I
| K_J
| K_K
| K_L
| K_M
| K_N
| K_O
| K_P
| K_Q
| K_R
| K_S
| K_T
| K_U
| K_V
| K_W
| K_X
| K_Y
| K_Z
| K_DELETE
| K_WORLD_0
| K_WORLD_1
| K_WORLD_2
| K_WORLD_3
| K_WORLD_4
| K_WORLD_5
| K_WORLD_6
| K_WORLD_7
| K_WORLD_8
| K_WORLD_9
| K_WORLD_10
| K_WORLD_11
| K_WORLD_12
| K_WORLD_13
| K_WORLD_14
| K_WORLD_15
| K_WORLD_16
| K_WORLD_17
| K_WORLD_18
| K_WORLD_19
| K_WORLD_20
| K_WORLD_21
| K_WORLD_22
| K_WORLD_23
| K_WORLD_24
| K_WORLD_25
| K_WORLD_26
| K_WORLD_27
| K_WORLD_28
| K_WORLD_29
| K_WORLD_30
| K_WORLD_31
| K_WORLD_32
| K_WORLD_33
| K_WORLD_34
| K_WORLD_35
| K_WORLD_36
| K_WORLD_37
| K_WORLD_38
| K_WORLD_39
| K_WORLD_40
| K_WORLD_41
| K_WORLD_42
| K_WORLD_43
| K_WORLD_44
| K_WORLD_45
| K_WORLD_46
| K_WORLD_47
| K_WORLD_48
| K_WORLD_49
| K_WORLD_50
| K_WORLD_51
| K_WORLD_52
| K_WORLD_53
| K_WORLD_54
| K_WORLD_55
| K_WORLD_56
| K_WORLD_57
| K_WORLD_58
| K_WORLD_59
| K_WORLD_60
| K_WORLD_61
| K_WORLD_62
| K_WORLD_63
| K_WORLD_64
| K_WORLD_65
| K_WORLD_66
| K_WORLD_67
| K_WORLD_68
| K_WORLD_69
| K_WORLD_70
| K_WORLD_71
| K_WORLD_72
| K_WORLD_73
| K_WORLD_74
| K_WORLD_75
| K_WORLD_76
| K_WORLD_77
| K_WORLD_78
| K_WORLD_79
| K_WORLD_80
| K_WORLD_81
| K_WORLD_82
| K_WORLD_83
| K_WORLD_84
| K_WORLD_85
| K_WORLD_86
| K_WORLD_87
| K_WORLD_88
| K_WORLD_89
| K_WORLD_90
| K_WORLD_91
| K_WORLD_92
| K_WORLD_93
| K_WORLD_94
| K_WORLD_95
| K_KP0
| K_KP1
| K_KP2
| K_KP3
| K_KP4
| K_KP5
| K_KP6
| K_KP7
| K_KP8
| K_KP9
| K_KP_PERIOD
| K_KP_DIVIDE
| K_KP_MULTIPLY
| K_KP_MINUS
| K_KP_PLUS
| K_KP_ENTER
| K_KP_EQUALS
| K_UP
| K_DOWN
| K_RIGHT
| K_LEFT
| K_INSERT
| K_HOME
| K_END
| K_PAGEUP
| K_PAGEDOWN
| K_F1
| K_F2
| K_F3
| K_F4
| K_F5
| K_F6
| K_F7
| K_F8
| K_F9
| K_F10
| K_F11
| K_F12
| K_F13
| K_F14
| K_F15
| K_NUMLOCK
| K_CAPSLOCK
| K_SCROLLLOCK
| K_RSHIFT
| K_LSHIFT
| K_RCTRL
| K_LCTRL
| K_RALT
| K_LALT
| K_RMETA
| K_LMETA
| K_LSUPER
| K_RSUPER
| K_MODE
| K_COMPOSE
| K_HELP
| K_PRINT
| K_SYSREQ
| K_BREAK
| K_MENU
| K_POWER
| K_EURO
type key_mod =
KMOD_NONE
| KMOD_LSHIFT
| KMOD_RSHIFT
| KMOD_LCTRL
| KMOD_RCTRL
| KMOD_LALT
| KMOD_RALT
| KMOD_LMETA
| KMOD_RMETA
| KMOD_NUM
| KMOD_CAPS
| KMOD_MODE
| KMOD_RESERVED
val enable_unicode : Sdl.Event.que_dis_ena -> Sdl.Event.off_on
val default_repeat_delay : int
val default_repeat_interval : int
val enable_key_repeat : int -> int -> unit
val get_mod_state : unit -> Sdl.Event.key_mod list
val set_mod_state : Sdl.Event.key_mod list -> unit
val get_key_name : Sdl.Event.key -> string
type press_release = RELEASED | PRESSED
type lost_gained = LOST | GAINED
type active_event = {
focus : Sdl.Event.lost_gained;
state : Sdl.Event.app_state;
}
type keyboard_event = {
keystate : Sdl.Event.press_release;
scancode : int;
sym : Sdl.Event.key;
modifiers : Sdl.Event.key_mod list;
unicode : int;
}
type mouse_button = LEFT | MIDDLE | RIGHT | WHEELUP | WHEELDOWN
type mouse_motion_event = {
mousestate : Sdl.Event.press_release;
mx : int;
my : int;
mxrel : int;
myrel : int;
}
type mouse_button_event = {
mousebutton : Sdl.Event.mouse_button;
buttonstate : Sdl.Event.press_release;
bx : int;
by : int;
}
type joy_axis_event = { which_axis : int; axis : int; jvalue : int; }
type joy_ball_event = {
which_ball : int;
ball : int;
jxrel : int;
jyrel : int;
}
type joy_hat_event = { which_hat : int; hat : int; hvalue : int; }
type joy_button_event = {
which_button : int;
joybutton : int;
jstate : Sdl.Event.press_release;
}
type resize_event = { w : int; h : int; }
type user_event = {
code : int;
data1 : Sdl.Event.pointer;
data2 : Sdl.Event.pointer;
}
type sys_wm_event
type event =
NoEvent
| Active of Sdl.Event.active_event
| Key of Sdl.Event.keyboard_event
| Motion of Sdl.Event.mouse_motion_event
| Button of Sdl.Event.mouse_button_event
| Jaxis of Sdl.Event.joy_axis_event
| Jball of Sdl.Event.joy_ball_event
| Jhat of Sdl.Event.joy_hat_event
| Jbutton of Sdl.Event.joy_button_event
| Resize of Sdl.Event.resize_event
| Expose
| Quit
| User of Sdl.Event.user_event
| Syswm of Sdl.Event.sys_wm_event
val pump_events : unit -> unit
val poll_event : unit -> Sdl.Event.event
val wait_event : unit -> Sdl.Event.event
end