{ "header": "SDL_events.h", "opaque_types": [], "typedefs": [], "function_pointers": [ { "name": "SDL_EventFilter", "return_type": "bool", "parameters": [ { "name": "userdata", "type": "void *" }, { "name": "event", "type": "SDL_Event *" } ] } ], "enums": [ { "name": "SDL_EventType", "values": [ { "name": "SDL_EVENT_DISPLAY_FIRST", "value": "SDL_EVENT_DISPLAY_ORIENTATION" }, { "name": "SDL_EVENT_DISPLAY_LAST", "value": "SDL_EVENT_DISPLAY_CONTENT_SCALE_CHANGED" }, { "name": "SDL_EVENT_WINDOW_FIRST", "value": "SDL_EVENT_WINDOW_SHOWN" }, { "name": "SDL_EVENT_WINDOW_LAST", "value": "SDL_EVENT_WINDOW_HDR_STATE_CHANGED" }, { "name": "SDL_EVENT_FINGER_DOWN", "value": "0x700" }, { "name": "SDL_EVENT_FINGER_UP" }, { "name": "SDL_EVENT_FINGER_MOTION" }, { "name": "SDL_EVENT_FINGER_CANCELED" }, { "name": "SDL_EVENT_PRIVATE0", "value": "0x4000" }, { "name": "SDL_EVENT_PRIVATE1" }, { "name": "SDL_EVENT_PRIVATE2" }, { "name": "SDL_EVENT_PRIVATE3" }, { "name": "SDL_EVENT_USER", "value": "0x8000" }, { "name": "SDL_EVENT_LAST", "value": "0xFFFF" }, { "name": "SDL_EVENT_ENUM_PADDING", "value": "0x7FFFFFFF" } ] }, { "name": "SDL_EventAction", "values": [] } ], "structs": [ { "name": "SDL_CommonEvent", "fields": [ { "name": "type", "type": "Uint32", "comment": "Event type, shared with all events, Uint32 to cover user events which are not in the SDL_EventType enumeration" }, { "name": "reserved", "type": "Uint32" }, { "name": "timestamp", "type": "Uint64", "comment": "In nanoseconds, populated using SDL_GetTicksNS()" } ] }, { "name": "SDL_DisplayEvent", "fields": [ { "name": "type", "type": "SDL_EventType", "comment": "SDL_DISPLAYEVENT_*" }, { "name": "reserved", "type": "Uint32" }, { "name": "timestamp", "type": "Uint64", "comment": "In nanoseconds, populated using SDL_GetTicksNS()" }, { "name": "displayID", "type": "SDL_DisplayID", "comment": "The associated display" }, { "name": "data1", "type": "Sint32", "comment": "event dependent data" }, { "name": "data2", "type": "Sint32", "comment": "event dependent data" } ] }, { "name": "SDL_WindowEvent", "fields": [ { "name": "type", "type": "SDL_EventType", "comment": "SDL_EVENT_WINDOW_*" }, { "name": "reserved", "type": "Uint32" }, { "name": "timestamp", "type": "Uint64", "comment": "In nanoseconds, populated using SDL_GetTicksNS()" }, { "name": "windowID", "type": "SDL_WindowID", "comment": "The associated window" }, { "name": "data1", "type": "Sint32", "comment": "event dependent data" }, { "name": "data2", "type": "Sint32", "comment": "event dependent data" } ] }, { "name": "SDL_KeyboardDeviceEvent", "fields": [ { "name": "type", "type": "SDL_EventType", "comment": "SDL_EVENT_KEYBOARD_ADDED or SDL_EVENT_KEYBOARD_REMOVED" }, { "name": "reserved", "type": "Uint32" }, { "name": "timestamp", "type": "Uint64", "comment": "In nanoseconds, populated using SDL_GetTicksNS()" }, { "name": "which", "type": "SDL_KeyboardID", "comment": "The keyboard instance id" } ] }, { "name": "SDL_KeyboardEvent", "fields": [ { "name": "type", "type": "SDL_EventType", "comment": "SDL_EVENT_KEY_DOWN or SDL_EVENT_KEY_UP" }, { "name": "reserved", "type": "Uint32" }, { "name": "timestamp", "type": "Uint64", "comment": "In nanoseconds, populated using SDL_GetTicksNS()" }, { "name": "windowID", "type": "SDL_WindowID", "comment": "The window with keyboard focus, if any" }, { "name": "which", "type": "SDL_KeyboardID", "comment": "The keyboard instance id, or 0 if unknown or virtual" }, { "name": "scancode", "type": "SDL_Scancode", "comment": "SDL physical key code" }, { "name": "key", "type": "SDL_Keycode", "comment": "SDL virtual key code" }, { "name": "mod", "type": "SDL_Keymod", "comment": "current key modifiers" }, { "name": "raw", "type": "Uint16", "comment": "The platform dependent scancode for this event" }, { "name": "down", "type": "bool", "comment": "true if the key is pressed" }, { "name": "repeat", "type": "bool", "comment": "true if this is a key repeat" } ] }, { "name": "SDL_TextEditingEvent", "fields": [ { "name": "type", "type": "SDL_EventType", "comment": "SDL_EVENT_TEXT_EDITING" }, { "name": "reserved", "type": "Uint32" }, { "name": "timestamp", "type": "Uint64", "comment": "In nanoseconds, populated using SDL_GetTicksNS()" }, { "name": "windowID", "type": "SDL_WindowID", "comment": "The window with keyboard focus, if any" }, { "name": "text", "type": "const char *", "comment": "The editing text" }, { "name": "start", "type": "Sint32", "comment": "The start cursor of selected editing text, or -1 if not set" }, { "name": "length", "type": "Sint32", "comment": "The length of selected editing text, or -1 if not set" } ] }, { "name": "SDL_TextEditingCandidatesEvent", "fields": [ { "name": "type", "type": "SDL_EventType", "comment": "SDL_EVENT_TEXT_EDITING_CANDIDATES" }, { "name": "reserved", "type": "Uint32" }, { "name": "timestamp", "type": "Uint64", "comment": "In nanoseconds, populated using SDL_GetTicksNS()" }, { "name": "windowID", "type": "SDL_WindowID", "comment": "The window with keyboard focus, if any" }, { "name": "candidates", "type": "const char * const *", "comment": "The list of candidates, or NULL if there are no candidates available" }, { "name": "num_candidates", "type": "Sint32", "comment": "The number of strings in `candidates`" }, { "name": "selected_candidate", "type": "Sint32", "comment": "The index of the selected candidate, or -1 if no candidate is selected" }, { "name": "horizontal", "type": "bool", "comment": "true if the list is horizontal, false if it's vertical" }, { "name": "padding1", "type": "Uint8" }, { "name": "padding2", "type": "Uint8" }, { "name": "padding3", "type": "Uint8" } ] }, { "name": "SDL_TextInputEvent", "fields": [ { "name": "type", "type": "SDL_EventType", "comment": "SDL_EVENT_TEXT_INPUT" }, { "name": "reserved", "type": "Uint32" }, { "name": "timestamp", "type": "Uint64", "comment": "In nanoseconds, populated using SDL_GetTicksNS()" }, { "name": "windowID", "type": "SDL_WindowID", "comment": "The window with keyboard focus, if any" }, { "name": "text", "type": "const char *", "comment": "The input text, UTF-8 encoded" } ] }, { "name": "SDL_MouseDeviceEvent", "fields": [ { "name": "type", "type": "SDL_EventType", "comment": "SDL_EVENT_MOUSE_ADDED or SDL_EVENT_MOUSE_REMOVED" }, { "name": "reserved", "type": "Uint32" }, { "name": "timestamp", "type": "Uint64", "comment": "In nanoseconds, populated using SDL_GetTicksNS()" }, { "name": "which", "type": "SDL_MouseID", "comment": "The mouse instance id" } ] }, { "name": "SDL_MouseMotionEvent", "fields": [ { "name": "type", "type": "SDL_EventType", "comment": "SDL_EVENT_MOUSE_MOTION" }, { "name": "reserved", "type": "Uint32" }, { "name": "timestamp", "type": "Uint64", "comment": "In nanoseconds, populated using SDL_GetTicksNS()" }, { "name": "windowID", "type": "SDL_WindowID", "comment": "The window with mouse focus, if any" }, { "name": "which", "type": "SDL_MouseID", "comment": "The mouse instance id in relative mode, SDL_TOUCH_MOUSEID for touch events, or 0" }, { "name": "state", "type": "SDL_MouseButtonFlags", "comment": "The current button state" }, { "name": "x", "type": "float", "comment": "X coordinate, relative to window" }, { "name": "y", "type": "float", "comment": "Y coordinate, relative to window" }, { "name": "xrel", "type": "float", "comment": "The relative motion in the X direction" }, { "name": "yrel", "type": "float", "comment": "The relative motion in the Y direction" } ] }, { "name": "SDL_MouseButtonEvent", "fields": [ { "name": "type", "type": "SDL_EventType", "comment": "SDL_EVENT_MOUSE_BUTTON_DOWN or SDL_EVENT_MOUSE_BUTTON_UP" }, { "name": "reserved", "type": "Uint32" }, { "name": "timestamp", "type": "Uint64", "comment": "In nanoseconds, populated using SDL_GetTicksNS()" }, { "name": "windowID", "type": "SDL_WindowID", "comment": "The window with mouse focus, if any" }, { "name": "which", "type": "SDL_MouseID", "comment": "The mouse instance id in relative mode, SDL_TOUCH_MOUSEID for touch events, or 0" }, { "name": "button", "type": "Uint8", "comment": "The mouse button index" }, { "name": "down", "type": "bool", "comment": "true if the button is pressed" }, { "name": "clicks", "type": "Uint8", "comment": "1 for single-click, 2 for double-click, etc." }, { "name": "padding", "type": "Uint8" }, { "name": "x", "type": "float", "comment": "X coordinate, relative to window" }, { "name": "y", "type": "float", "comment": "Y coordinate, relative to window" } ] }, { "name": "SDL_MouseWheelEvent", "fields": [ { "name": "type", "type": "SDL_EventType", "comment": "SDL_EVENT_MOUSE_WHEEL" }, { "name": "reserved", "type": "Uint32" }, { "name": "timestamp", "type": "Uint64", "comment": "In nanoseconds, populated using SDL_GetTicksNS()" }, { "name": "windowID", "type": "SDL_WindowID", "comment": "The window with mouse focus, if any" }, { "name": "which", "type": "SDL_MouseID", "comment": "The mouse instance id in relative mode or 0" }, { "name": "x", "type": "float", "comment": "The amount scrolled horizontally, positive to the right and negative to the left" }, { "name": "y", "type": "float", "comment": "The amount scrolled vertically, positive away from the user and negative toward the user" }, { "name": "direction", "type": "SDL_MouseWheelDirection", "comment": "Set to one of the SDL_MOUSEWHEEL_* defines. When FLIPPED the values in X and Y will be opposite. Multiply by -1 to change them back" }, { "name": "mouse_x", "type": "float", "comment": "X coordinate, relative to window" }, { "name": "mouse_y", "type": "float", "comment": "Y coordinate, relative to window" } ] }, { "name": "SDL_JoyAxisEvent", "fields": [ { "name": "type", "type": "SDL_EventType", "comment": "SDL_EVENT_JOYSTICK_AXIS_MOTION" }, { "name": "reserved", "type": "Uint32" }, { "name": "timestamp", "type": "Uint64", "comment": "In nanoseconds, populated using SDL_GetTicksNS()" }, { "name": "which", "type": "SDL_JoystickID", "comment": "The joystick instance id" }, { "name": "axis", "type": "Uint8", "comment": "The joystick axis index" }, { "name": "padding1", "type": "Uint8" }, { "name": "padding2", "type": "Uint8" }, { "name": "padding3", "type": "Uint8" }, { "name": "value", "type": "Sint16", "comment": "The axis value (range: -32768 to 32767)" }, { "name": "padding4", "type": "Uint16" } ] }, { "name": "SDL_JoyBallEvent", "fields": [ { "name": "type", "type": "SDL_EventType", "comment": "SDL_EVENT_JOYSTICK_BALL_MOTION" }, { "name": "reserved", "type": "Uint32" }, { "name": "timestamp", "type": "Uint64", "comment": "In nanoseconds, populated using SDL_GetTicksNS()" }, { "name": "which", "type": "SDL_JoystickID", "comment": "The joystick instance id" }, { "name": "ball", "type": "Uint8", "comment": "The joystick trackball index" }, { "name": "padding1", "type": "Uint8" }, { "name": "padding2", "type": "Uint8" }, { "name": "padding3", "type": "Uint8" }, { "name": "xrel", "type": "Sint16", "comment": "The relative motion in the X direction" }, { "name": "yrel", "type": "Sint16", "comment": "The relative motion in the Y direction" } ] }, { "name": "SDL_JoyHatEvent", "fields": [ { "name": "type", "type": "SDL_EventType", "comment": "SDL_EVENT_JOYSTICK_HAT_MOTION" }, { "name": "reserved", "type": "Uint32" }, { "name": "timestamp", "type": "Uint64", "comment": "In nanoseconds, populated using SDL_GetTicksNS()" }, { "name": "which", "type": "SDL_JoystickID", "comment": "The joystick instance id" }, { "name": "hat", "type": "Uint8", "comment": "The joystick hat index" }, { "name": "padding1", "type": "Uint8" }, { "name": "padding2", "type": "Uint8" } ] }, { "name": "SDL_JoyButtonEvent", "fields": [ { "name": "type", "type": "SDL_EventType", "comment": "SDL_EVENT_JOYSTICK_BUTTON_DOWN or SDL_EVENT_JOYSTICK_BUTTON_UP" }, { "name": "reserved", "type": "Uint32" }, { "name": "timestamp", "type": "Uint64", "comment": "In nanoseconds, populated using SDL_GetTicksNS()" }, { "name": "which", "type": "SDL_JoystickID", "comment": "The joystick instance id" }, { "name": "button", "type": "Uint8", "comment": "The joystick button index" }, { "name": "down", "type": "bool", "comment": "true if the button is pressed" }, { "name": "padding1", "type": "Uint8" }, { "name": "padding2", "type": "Uint8" } ] }, { "name": "SDL_JoyDeviceEvent", "fields": [ { "name": "type", "type": "SDL_EventType", "comment": "SDL_EVENT_JOYSTICK_ADDED or SDL_EVENT_JOYSTICK_REMOVED or SDL_EVENT_JOYSTICK_UPDATE_COMPLETE" }, { "name": "reserved", "type": "Uint32" }, { "name": "timestamp", "type": "Uint64", "comment": "In nanoseconds, populated using SDL_GetTicksNS()" }, { "name": "which", "type": "SDL_JoystickID", "comment": "The joystick instance id" } ] }, { "name": "SDL_JoyBatteryEvent", "fields": [ { "name": "type", "type": "SDL_EventType", "comment": "SDL_EVENT_JOYSTICK_BATTERY_UPDATED" }, { "name": "reserved", "type": "Uint32" }, { "name": "timestamp", "type": "Uint64", "comment": "In nanoseconds, populated using SDL_GetTicksNS()" }, { "name": "which", "type": "SDL_JoystickID", "comment": "The joystick instance id" }, { "name": "state", "type": "SDL_PowerState", "comment": "The joystick battery state" }, { "name": "percent", "type": "int", "comment": "The joystick battery percent charge remaining" } ] }, { "name": "SDL_GamepadAxisEvent", "fields": [ { "name": "type", "type": "SDL_EventType", "comment": "SDL_EVENT_GAMEPAD_AXIS_MOTION" }, { "name": "reserved", "type": "Uint32" }, { "name": "timestamp", "type": "Uint64", "comment": "In nanoseconds, populated using SDL_GetTicksNS()" }, { "name": "which", "type": "SDL_JoystickID", "comment": "The joystick instance id" }, { "name": "axis", "type": "Uint8", "comment": "The gamepad axis (SDL_GamepadAxis)" }, { "name": "padding1", "type": "Uint8" }, { "name": "padding2", "type": "Uint8" }, { "name": "padding3", "type": "Uint8" }, { "name": "value", "type": "Sint16", "comment": "The axis value (range: -32768 to 32767)" }, { "name": "padding4", "type": "Uint16" } ] }, { "name": "SDL_GamepadButtonEvent", "fields": [ { "name": "type", "type": "SDL_EventType", "comment": "SDL_EVENT_GAMEPAD_BUTTON_DOWN or SDL_EVENT_GAMEPAD_BUTTON_UP" }, { "name": "reserved", "type": "Uint32" }, { "name": "timestamp", "type": "Uint64", "comment": "In nanoseconds, populated using SDL_GetTicksNS()" }, { "name": "which", "type": "SDL_JoystickID", "comment": "The joystick instance id" }, { "name": "button", "type": "Uint8", "comment": "The gamepad button (SDL_GamepadButton)" }, { "name": "down", "type": "bool", "comment": "true if the button is pressed" }, { "name": "padding1", "type": "Uint8" }, { "name": "padding2", "type": "Uint8" } ] }, { "name": "SDL_GamepadDeviceEvent", "fields": [ { "name": "type", "type": "SDL_EventType", "comment": "SDL_EVENT_GAMEPAD_ADDED, SDL_EVENT_GAMEPAD_REMOVED, or SDL_EVENT_GAMEPAD_REMAPPED, SDL_EVENT_GAMEPAD_UPDATE_COMPLETE or SDL_EVENT_GAMEPAD_STEAM_HANDLE_UPDATED" }, { "name": "reserved", "type": "Uint32" }, { "name": "timestamp", "type": "Uint64", "comment": "In nanoseconds, populated using SDL_GetTicksNS()" }, { "name": "which", "type": "SDL_JoystickID", "comment": "The joystick instance id" } ] }, { "name": "SDL_GamepadTouchpadEvent", "fields": [ { "name": "type", "type": "SDL_EventType", "comment": "SDL_EVENT_GAMEPAD_TOUCHPAD_DOWN or SDL_EVENT_GAMEPAD_TOUCHPAD_MOTION or SDL_EVENT_GAMEPAD_TOUCHPAD_UP" }, { "name": "reserved", "type": "Uint32" }, { "name": "timestamp", "type": "Uint64", "comment": "In nanoseconds, populated using SDL_GetTicksNS()" }, { "name": "which", "type": "SDL_JoystickID", "comment": "The joystick instance id" }, { "name": "touchpad", "type": "Sint32", "comment": "The index of the touchpad" }, { "name": "finger", "type": "Sint32", "comment": "The index of the finger on the touchpad" }, { "name": "x", "type": "float", "comment": "Normalized in the range 0...1 with 0 being on the left" }, { "name": "y", "type": "float", "comment": "Normalized in the range 0...1 with 0 being at the top" }, { "name": "pressure", "type": "float", "comment": "Normalized in the range 0...1" } ] }, { "name": "SDL_GamepadSensorEvent", "fields": [ { "name": "type", "type": "SDL_EventType", "comment": "SDL_EVENT_GAMEPAD_SENSOR_UPDATE" }, { "name": "reserved", "type": "Uint32" }, { "name": "timestamp", "type": "Uint64", "comment": "In nanoseconds, populated using SDL_GetTicksNS()" }, { "name": "which", "type": "SDL_JoystickID", "comment": "The joystick instance id" }, { "name": "sensor", "type": "Sint32", "comment": "The type of the sensor, one of the values of SDL_SensorType" }, { "name": "data", "type": "float[3]", "comment": "Up to 3 values from the sensor, as defined in SDL_sensor.h" }, { "name": "sensor_timestamp", "type": "Uint64", "comment": "The timestamp of the sensor reading in nanoseconds, not necessarily synchronized with the system clock" } ] }, { "name": "SDL_AudioDeviceEvent", "fields": [ { "name": "type", "type": "SDL_EventType", "comment": "SDL_EVENT_AUDIO_DEVICE_ADDED, or SDL_EVENT_AUDIO_DEVICE_REMOVED, or SDL_EVENT_AUDIO_DEVICE_FORMAT_CHANGED" }, { "name": "reserved", "type": "Uint32" }, { "name": "timestamp", "type": "Uint64", "comment": "In nanoseconds, populated using SDL_GetTicksNS()" }, { "name": "which", "type": "SDL_AudioDeviceID", "comment": "SDL_AudioDeviceID for the device being added or removed or changing" }, { "name": "recording", "type": "bool", "comment": "false if a playback device, true if a recording device." }, { "name": "padding1", "type": "Uint8" }, { "name": "padding2", "type": "Uint8" }, { "name": "padding3", "type": "Uint8" } ] }, { "name": "SDL_CameraDeviceEvent", "fields": [ { "name": "type", "type": "SDL_EventType", "comment": "SDL_EVENT_CAMERA_DEVICE_ADDED, SDL_EVENT_CAMERA_DEVICE_REMOVED, SDL_EVENT_CAMERA_DEVICE_APPROVED, SDL_EVENT_CAMERA_DEVICE_DENIED" }, { "name": "reserved", "type": "Uint32" }, { "name": "timestamp", "type": "Uint64", "comment": "In nanoseconds, populated using SDL_GetTicksNS()" }, { "name": "which", "type": "SDL_CameraID", "comment": "SDL_CameraID for the device being added or removed or changing" } ] }, { "name": "SDL_RenderEvent", "fields": [ { "name": "type", "type": "SDL_EventType", "comment": "SDL_EVENT_RENDER_TARGETS_RESET, SDL_EVENT_RENDER_DEVICE_RESET, SDL_EVENT_RENDER_DEVICE_LOST" }, { "name": "reserved", "type": "Uint32" }, { "name": "timestamp", "type": "Uint64", "comment": "In nanoseconds, populated using SDL_GetTicksNS()" }, { "name": "windowID", "type": "SDL_WindowID", "comment": "The window containing the renderer in question." } ] }, { "name": "SDL_TouchFingerEvent", "fields": [ { "name": "type", "type": "SDL_EventType", "comment": "SDL_EVENT_FINGER_DOWN, SDL_EVENT_FINGER_UP, SDL_EVENT_FINGER_MOTION, or SDL_EVENT_FINGER_CANCELED" }, { "name": "reserved", "type": "Uint32" }, { "name": "timestamp", "type": "Uint64", "comment": "In nanoseconds, populated using SDL_GetTicksNS()" }, { "name": "touchID", "type": "SDL_TouchID", "comment": "The touch device id" }, { "name": "fingerID", "type": "SDL_FingerID" }, { "name": "x", "type": "float", "comment": "Normalized in the range 0...1" }, { "name": "y", "type": "float", "comment": "Normalized in the range 0...1" }, { "name": "dx", "type": "float", "comment": "Normalized in the range -1...1" }, { "name": "dy", "type": "float", "comment": "Normalized in the range -1...1" }, { "name": "pressure", "type": "float", "comment": "Normalized in the range 0...1" }, { "name": "windowID", "type": "SDL_WindowID", "comment": "The window underneath the finger, if any" } ] }, { "name": "SDL_PenProximityEvent", "fields": [ { "name": "type", "type": "SDL_EventType", "comment": "SDL_EVENT_PEN_PROXIMITY_IN or SDL_EVENT_PEN_PROXIMITY_OUT" }, { "name": "reserved", "type": "Uint32" }, { "name": "timestamp", "type": "Uint64", "comment": "In nanoseconds, populated using SDL_GetTicksNS()" }, { "name": "windowID", "type": "SDL_WindowID", "comment": "The window with pen focus, if any" }, { "name": "which", "type": "SDL_PenID", "comment": "The pen instance id" } ] }, { "name": "SDL_PenMotionEvent", "fields": [ { "name": "type", "type": "SDL_EventType", "comment": "SDL_EVENT_PEN_MOTION" }, { "name": "reserved", "type": "Uint32" }, { "name": "timestamp", "type": "Uint64", "comment": "In nanoseconds, populated using SDL_GetTicksNS()" }, { "name": "windowID", "type": "SDL_WindowID", "comment": "The window with pen focus, if any" }, { "name": "which", "type": "SDL_PenID", "comment": "The pen instance id" }, { "name": "pen_state", "type": "SDL_PenInputFlags", "comment": "Complete pen input state at time of event" }, { "name": "x", "type": "float", "comment": "X coordinate, relative to window" }, { "name": "y", "type": "float", "comment": "Y coordinate, relative to window" } ] }, { "name": "SDL_PenTouchEvent", "fields": [ { "name": "type", "type": "SDL_EventType", "comment": "SDL_EVENT_PEN_DOWN or SDL_EVENT_PEN_UP" }, { "name": "reserved", "type": "Uint32" }, { "name": "timestamp", "type": "Uint64", "comment": "In nanoseconds, populated using SDL_GetTicksNS()" }, { "name": "windowID", "type": "SDL_WindowID", "comment": "The window with pen focus, if any" }, { "name": "which", "type": "SDL_PenID", "comment": "The pen instance id" }, { "name": "pen_state", "type": "SDL_PenInputFlags", "comment": "Complete pen input state at time of event" }, { "name": "x", "type": "float", "comment": "X coordinate, relative to window" }, { "name": "y", "type": "float", "comment": "Y coordinate, relative to window" }, { "name": "eraser", "type": "bool", "comment": "true if eraser end is used (not all pens support this)." }, { "name": "down", "type": "bool", "comment": "true if the pen is touching or false if the pen is lifted off" } ] }, { "name": "SDL_PenButtonEvent", "fields": [ { "name": "type", "type": "SDL_EventType", "comment": "SDL_EVENT_PEN_BUTTON_DOWN or SDL_EVENT_PEN_BUTTON_UP" }, { "name": "reserved", "type": "Uint32" }, { "name": "timestamp", "type": "Uint64", "comment": "In nanoseconds, populated using SDL_GetTicksNS()" }, { "name": "windowID", "type": "SDL_WindowID", "comment": "The window with mouse focus, if any" }, { "name": "which", "type": "SDL_PenID", "comment": "The pen instance id" }, { "name": "pen_state", "type": "SDL_PenInputFlags", "comment": "Complete pen input state at time of event" }, { "name": "x", "type": "float", "comment": "X coordinate, relative to window" }, { "name": "y", "type": "float", "comment": "Y coordinate, relative to window" }, { "name": "button", "type": "Uint8", "comment": "The pen button index (first button is 1)." }, { "name": "down", "type": "bool", "comment": "true if the button is pressed" } ] }, { "name": "SDL_PenAxisEvent", "fields": [ { "name": "type", "type": "SDL_EventType", "comment": "SDL_EVENT_PEN_AXIS" }, { "name": "reserved", "type": "Uint32" }, { "name": "timestamp", "type": "Uint64", "comment": "In nanoseconds, populated using SDL_GetTicksNS()" }, { "name": "windowID", "type": "SDL_WindowID", "comment": "The window with pen focus, if any" }, { "name": "which", "type": "SDL_PenID", "comment": "The pen instance id" }, { "name": "pen_state", "type": "SDL_PenInputFlags", "comment": "Complete pen input state at time of event" }, { "name": "x", "type": "float", "comment": "X coordinate, relative to window" }, { "name": "y", "type": "float", "comment": "Y coordinate, relative to window" }, { "name": "axis", "type": "SDL_PenAxis", "comment": "Axis that has changed" }, { "name": "value", "type": "float", "comment": "New value of axis" } ] }, { "name": "SDL_DropEvent", "fields": [ { "name": "type", "type": "SDL_EventType", "comment": "SDL_EVENT_DROP_BEGIN or SDL_EVENT_DROP_FILE or SDL_EVENT_DROP_TEXT or SDL_EVENT_DROP_COMPLETE or SDL_EVENT_DROP_POSITION" }, { "name": "reserved", "type": "Uint32" }, { "name": "timestamp", "type": "Uint64", "comment": "In nanoseconds, populated using SDL_GetTicksNS()" }, { "name": "windowID", "type": "SDL_WindowID", "comment": "The window that was dropped on, if any" }, { "name": "x", "type": "float", "comment": "X coordinate, relative to window (not on begin)" }, { "name": "y", "type": "float", "comment": "Y coordinate, relative to window (not on begin)" }, { "name": "source", "type": "const char *", "comment": "The source app that sent this drop event, or NULL if that isn't available" }, { "name": "data", "type": "const char *", "comment": "The text for SDL_EVENT_DROP_TEXT and the file name for SDL_EVENT_DROP_FILE, NULL for other events" } ] }, { "name": "SDL_ClipboardEvent", "fields": [ { "name": "type", "type": "SDL_EventType", "comment": "SDL_EVENT_CLIPBOARD_UPDATE" }, { "name": "reserved", "type": "Uint32" }, { "name": "timestamp", "type": "Uint64", "comment": "In nanoseconds, populated using SDL_GetTicksNS()" }, { "name": "owner", "type": "bool", "comment": "are we owning the clipboard (internal update)" }, { "name": "num_mime_types", "type": "Sint32", "comment": "number of mime types" }, { "name": "mime_types", "type": "const char **", "comment": "current mime types" } ] }, { "name": "SDL_SensorEvent", "fields": [ { "name": "type", "type": "SDL_EventType", "comment": "SDL_EVENT_SENSOR_UPDATE" }, { "name": "reserved", "type": "Uint32" }, { "name": "timestamp", "type": "Uint64", "comment": "In nanoseconds, populated using SDL_GetTicksNS()" }, { "name": "which", "type": "SDL_SensorID", "comment": "The instance ID of the sensor" }, { "name": "data", "type": "float[6]", "comment": "Up to 6 values from the sensor - additional values can be queried using SDL_GetSensorData()" }, { "name": "sensor_timestamp", "type": "Uint64", "comment": "The timestamp of the sensor reading in nanoseconds, not necessarily synchronized with the system clock" } ] }, { "name": "SDL_QuitEvent", "fields": [ { "name": "type", "type": "SDL_EventType", "comment": "SDL_EVENT_QUIT" }, { "name": "reserved", "type": "Uint32" }, { "name": "timestamp", "type": "Uint64", "comment": "In nanoseconds, populated using SDL_GetTicksNS()" } ] }, { "name": "SDL_UserEvent", "fields": [ { "name": "type", "type": "Uint32", "comment": "SDL_EVENT_USER through SDL_EVENT_LAST-1, Uint32 because these are not in the SDL_EventType enumeration" }, { "name": "reserved", "type": "Uint32" }, { "name": "timestamp", "type": "Uint64", "comment": "In nanoseconds, populated using SDL_GetTicksNS()" }, { "name": "windowID", "type": "SDL_WindowID", "comment": "The associated window if any" }, { "name": "code", "type": "Sint32", "comment": "User defined event code" }, { "name": "data1", "type": "void *", "comment": "User defined data pointer" }, { "name": "data2", "type": "void *", "comment": "User defined data pointer" } ] } ], "unions": [ { "name": "SDL_Event", "fields": [ { "name": "type", "type": "Uint32", "comment": "Event type, shared with all events, Uint32 to cover user events which are not in the SDL_EventType enumeration" }, { "name": "common", "type": "SDL_CommonEvent", "comment": "Common event data" }, { "name": "display", "type": "SDL_DisplayEvent", "comment": "Display event data" }, { "name": "window", "type": "SDL_WindowEvent", "comment": "Window event data" }, { "name": "kdevice", "type": "SDL_KeyboardDeviceEvent", "comment": "Keyboard device change event data" }, { "name": "key", "type": "SDL_KeyboardEvent", "comment": "Keyboard event data" }, { "name": "edit", "type": "SDL_TextEditingEvent", "comment": "Text editing event data" }, { "name": "edit_candidates", "type": "SDL_TextEditingCandidatesEvent", "comment": "Text editing candidates event data" }, { "name": "text", "type": "SDL_TextInputEvent", "comment": "Text input event data" }, { "name": "mdevice", "type": "SDL_MouseDeviceEvent", "comment": "Mouse device change event data" }, { "name": "motion", "type": "SDL_MouseMotionEvent", "comment": "Mouse motion event data" }, { "name": "button", "type": "SDL_MouseButtonEvent", "comment": "Mouse button event data" }, { "name": "wheel", "type": "SDL_MouseWheelEvent", "comment": "Mouse wheel event data" }, { "name": "jdevice", "type": "SDL_JoyDeviceEvent", "comment": "Joystick device change event data" }, { "name": "jaxis", "type": "SDL_JoyAxisEvent", "comment": "Joystick axis event data" }, { "name": "jball", "type": "SDL_JoyBallEvent", "comment": "Joystick ball event data" }, { "name": "jhat", "type": "SDL_JoyHatEvent", "comment": "Joystick hat event data" }, { "name": "jbutton", "type": "SDL_JoyButtonEvent", "comment": "Joystick button event data" }, { "name": "jbattery", "type": "SDL_JoyBatteryEvent", "comment": "Joystick battery event data" }, { "name": "gdevice", "type": "SDL_GamepadDeviceEvent", "comment": "Gamepad device event data" }, { "name": "gaxis", "type": "SDL_GamepadAxisEvent", "comment": "Gamepad axis event data" }, { "name": "gbutton", "type": "SDL_GamepadButtonEvent", "comment": "Gamepad button event data" }, { "name": "gtouchpad", "type": "SDL_GamepadTouchpadEvent", "comment": "Gamepad touchpad event data" }, { "name": "gsensor", "type": "SDL_GamepadSensorEvent", "comment": "Gamepad sensor event data" }, { "name": "adevice", "type": "SDL_AudioDeviceEvent", "comment": "Audio device event data" }, { "name": "cdevice", "type": "SDL_CameraDeviceEvent", "comment": "Camera device event data" }, { "name": "sensor", "type": "SDL_SensorEvent", "comment": "Sensor event data" }, { "name": "quit", "type": "SDL_QuitEvent", "comment": "Quit request event data" }, { "name": "user", "type": "SDL_UserEvent", "comment": "Custom event data" }, { "name": "tfinger", "type": "SDL_TouchFingerEvent", "comment": "Touch finger event data" }, { "name": "pproximity", "type": "SDL_PenProximityEvent", "comment": "Pen proximity event data" }, { "name": "ptouch", "type": "SDL_PenTouchEvent", "comment": "Pen tip touching event data" }, { "name": "pmotion", "type": "SDL_PenMotionEvent", "comment": "Pen motion event data" }, { "name": "pbutton", "type": "SDL_PenButtonEvent", "comment": "Pen button event data" }, { "name": "paxis", "type": "SDL_PenAxisEvent", "comment": "Pen axis event data" }, { "name": "render", "type": "SDL_RenderEvent", "comment": "Render event data" }, { "name": "drop", "type": "SDL_DropEvent", "comment": "Drag and drop event data" }, { "name": "clipboard", "type": "SDL_ClipboardEvent", "comment": "Clipboard event data" }, { "name": "padding", "type": "Uint8[128]" } ] } ], "flags": [], "functions": [ { "name": "SDL_PumpEvents", "return_type": "void", "parameters": [] }, { "name": "SDL_PeepEvents", "return_type": "int", "parameters": [ { "name": "events", "type": "SDL_Event *" }, { "name": "numevents", "type": "int" }, { "name": "action", "type": "SDL_EventAction" }, { "name": "minType", "type": "Uint32" }, { "name": "maxType", "type": "Uint32" } ] }, { "name": "SDL_HasEvent", "return_type": "bool", "parameters": [ { "name": "type", "type": "Uint32" } ] }, { "name": "SDL_HasEvents", "return_type": "bool", "parameters": [ { "name": "minType", "type": "Uint32" }, { "name": "maxType", "type": "Uint32" } ] }, { "name": "SDL_FlushEvent", "return_type": "void", "parameters": [ { "name": "type", "type": "Uint32" } ] }, { "name": "SDL_FlushEvents", "return_type": "void", "parameters": [ { "name": "minType", "type": "Uint32" }, { "name": "maxType", "type": "Uint32" } ] }, { "name": "SDL_PollEvent", "return_type": "bool", "parameters": [ { "name": "event", "type": "SDL_Event *" } ] }, { "name": "SDL_WaitEvent", "return_type": "bool", "parameters": [ { "name": "event", "type": "SDL_Event *" } ] }, { "name": "SDL_WaitEventTimeout", "return_type": "bool", "parameters": [ { "name": "event", "type": "SDL_Event *" }, { "name": "timeoutMS", "type": "Sint32" } ] }, { "name": "SDL_PushEvent", "return_type": "bool", "parameters": [ { "name": "event", "type": "SDL_Event *" } ] }, { "name": "SDL_SetEventFilter", "return_type": "void", "parameters": [ { "name": "filter", "type": "SDL_EventFilter" }, { "name": "userdata", "type": "void *" } ] }, { "name": "SDL_GetEventFilter", "return_type": "bool", "parameters": [ { "name": "filter", "type": "SDL_EventFilter *" }, { "name": "userdata", "type": "void **" } ] }, { "name": "SDL_AddEventWatch", "return_type": "bool", "parameters": [ { "name": "filter", "type": "SDL_EventFilter" }, { "name": "userdata", "type": "void *" } ] }, { "name": "SDL_RemoveEventWatch", "return_type": "void", "parameters": [ { "name": "filter", "type": "SDL_EventFilter" }, { "name": "userdata", "type": "void *" } ] }, { "name": "SDL_FilterEvents", "return_type": "void", "parameters": [ { "name": "filter", "type": "SDL_EventFilter" }, { "name": "userdata", "type": "void *" } ] }, { "name": "SDL_SetEventEnabled", "return_type": "void", "parameters": [ { "name": "type", "type": "Uint32" }, { "name": "enabled", "type": "bool" } ] }, { "name": "SDL_EventEnabled", "return_type": "bool", "parameters": [ { "name": "type", "type": "Uint32" } ] }, { "name": "SDL_RegisterEvents", "return_type": "Uint32", "parameters": [ { "name": "numevents", "type": "int" } ] }, { "name": "SDL_GetWindowFromEvent", "return_type": "SDL_Window *", "parameters": [ { "name": "event", "type": "const SDL_Event *" } ] } ] }