module Sdlevent:sig
..end
Events handling
API Doc: Events category
type
state =
| |
Released |
| |
Pressed |
val string_of_state : state -> string
type
keyboard_event = {
|
ke_timestamp : |
|
ke_window_id : |
|
ke_state : |
|
ke_repeat : |
|
scancode : |
|
keycode : |
|
keymod : |
}
type
mouse_motion_event = {
|
mm_timestamp : |
|
mm_window_id : |
|
: |
|
mm_x : |
|
mm_y : |
|
mm_xrel : |
|
mm_yrel : |
}
= {
|
: |
|
: |
|
: |
|
: |
|
: |
|
: |
}
type
mouse_wheel_event = {
|
mw_timestamp : |
|
mw_window_id : |
|
mw_x : |
|
mw_y : |
}
type
joy_axis_event = {
|
ja_timestamp : |
|
ja_which : |
|
ja_axis : |
|
ja_value : |
}
= {
|
: |
|
: |
|
: |
|
: |
}
type
joy_hat_event = {
|
jh_timestamp : |
|
jh_which : |
|
jh_hat : |
|
jh_dir : |
|
jh_pos : |
}
type
joy_device_change =
| |
JoyDevice_Added |
| |
JoyDevice_Removed |
val string_of_joy_device_change : joy_device_change -> string
type
joy_device_event = {
|
jd_timestamp : |
|
jd_which : |
|
jd_change : |
}
type
window_event_xy = {
|
win_x : |
|
win_y : |
}
type
window_event_kind =
| |
WindowEvent_None |
| |
WindowEvent_Shown |
| |
WindowEvent_Hidden |
| |
WindowEvent_Exposed |
| |
WindowEvent_Moved of |
| |
WindowEvent_Resized of |
| |
WindowEvent_Size_Changed of |
| |
WindowEvent_Minimized |
| |
WindowEvent_Maximized |
| |
WindowEvent_Restored |
| |
WindowEvent_Enter |
| |
WindowEvent_Leave |
| |
WindowEvent_Focus_Gained |
| |
WindowEvent_Focus_Lost |
| |
WindowEvent_Close |
| |
WindowEvent_Take_Focus |
| |
WindowEvent_Hit_Test |
val string_of_window_event_kind : window_event_kind -> string
type
window_event = {
|
we_timestamp : |
|
window_ID : |
|
kind : |
}
type
quit_event = {
|
quit_timestamp : |
}
type
text_editing_event = {
|
te_timestamp : |
|
te_window_ID : |
|
te_text : |
|
te_begin : |
|
te_length : |
}
type
text_input_event = {
|
ti_timestamp : |
|
ti_window_ID : |
|
ti_text : |
}
type
t =
| |
Quit of |
| |
Mouse_Motion of |
| |
Mouse_Button_Down of |
| |
Mouse_Button_Up of |
| |
Mouse_Wheel of |
| |
KeyDown of |
| |
KeyUp of |
| |
Text_Editing of |
| |
Text_Input of |
| |
Joy_Axis_Motion of |
| |
Joy_Ball_Motion |
| |
Joy_Hat_Motion of |
| |
Joy_Button_Down of |
| |
Joy_Button_Up of |
| |
Joy_Device_Added of |
| |
Joy_Device_Removed of |
| |
Controller_Axis_Motion |
| |
Controller_Button_Down |
| |
Controller_Button_Up |
| |
Controller_Device_Added |
| |
Controller_Device_Removed |
| |
Controller_Device_Remapped |
| |
Finger_Down |
| |
Finger_Up |
| |
Finger_Motion |
| |
Dollar_Gesture |
| |
Dollar_Record |
| |
Multi_Gesture |
| |
Clipboard_Update |
| |
Drop_File |
| |
User_Event |
| |
Window_Event of |
| |
SysWM_Event |
| |
APP_Terminating |
| |
APP_LowMemory |
| |
APP_Will_Enter_Background |
| |
APP_Did_Enter_Background |
| |
APP_Will_Enter_Foreground |
| |
APP_Did_Enter_Foreground |
| |
Display_Event |
| |
Keymap_Changed |
| |
Drop_Text |
| |
Drop_Begin |
| |
Drop_Complete |
| |
Audio_Device_Added |
| |
Audio_Device_Removed |
| |
Sensor_Update |
| |
Render_Targets_Reset |
| |
Render_Device_Reset |
val poll_event : unit -> t option
val to_string : t -> string