{ "header": "SDL_gamepad.h", "opaque_types": [ { "name": "SDL_Gamepad" } ], "typedefs": [], "function_pointers": [], "c_type_aliases": [], "enums": [ { "name": "SDL_GamepadType", "values": [ { "name": "SDL_GAMEPAD_TYPE_STANDARD" }, { "name": "SDL_GAMEPAD_TYPE_XBOX360" }, { "name": "SDL_GAMEPAD_TYPE_XBOXONE" }, { "name": "SDL_GAMEPAD_TYPE_PS3" }, { "name": "SDL_GAMEPAD_TYPE_PS4" }, { "name": "SDL_GAMEPAD_TYPE_PS5" }, { "name": "SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_PRO" }, { "name": "SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_LEFT" }, { "name": "SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT" }, { "name": "SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_PAIR" }, { "name": "SDL_GAMEPAD_TYPE_GAMECUBE" }, { "name": "SDL_GAMEPAD_TYPE_COUNT" } ] }, { "name": "SDL_GamepadButton", "values": [ { "name": "SDL_GAMEPAD_BUTTON_SOUTH", "comment": "Bottom face button (e.g. Xbox A button)" }, { "name": "SDL_GAMEPAD_BUTTON_EAST", "comment": "Right face button (e.g. Xbox B button)" }, { "name": "SDL_GAMEPAD_BUTTON_WEST", "comment": "Left face button (e.g. Xbox X button)" }, { "name": "SDL_GAMEPAD_BUTTON_NORTH", "comment": "Top face button (e.g. Xbox Y button)" }, { "name": "SDL_GAMEPAD_BUTTON_BACK" }, { "name": "SDL_GAMEPAD_BUTTON_GUIDE" }, { "name": "SDL_GAMEPAD_BUTTON_START" }, { "name": "SDL_GAMEPAD_BUTTON_LEFT_STICK" }, { "name": "SDL_GAMEPAD_BUTTON_RIGHT_STICK" }, { "name": "SDL_GAMEPAD_BUTTON_LEFT_SHOULDER" }, { "name": "SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER" }, { "name": "SDL_GAMEPAD_BUTTON_DPAD_UP" }, { "name": "SDL_GAMEPAD_BUTTON_DPAD_DOWN" }, { "name": "SDL_GAMEPAD_BUTTON_DPAD_LEFT" }, { "name": "SDL_GAMEPAD_BUTTON_DPAD_RIGHT" }, { "name": "SDL_GAMEPAD_BUTTON_MISC1", "comment": "Additional button (e.g. Xbox Series X share button, PS5 microphone button, Nintendo Switch Pro capture button, Amazon Luna microphone button, Google Stadia capture button)" }, { "name": "SDL_GAMEPAD_BUTTON_RIGHT_PADDLE1", "comment": "Upper or primary paddle, under your right hand (e.g. Xbox Elite paddle P1, DualSense Edge RB button, Right Joy-Con SR button)" }, { "name": "SDL_GAMEPAD_BUTTON_LEFT_PADDLE1", "comment": "Upper or primary paddle, under your left hand (e.g. Xbox Elite paddle P3, DualSense Edge LB button, Left Joy-Con SL button)" }, { "name": "SDL_GAMEPAD_BUTTON_RIGHT_PADDLE2", "comment": "Lower or secondary paddle, under your right hand (e.g. Xbox Elite paddle P2, DualSense Edge right Fn button, Right Joy-Con SL button)" }, { "name": "SDL_GAMEPAD_BUTTON_LEFT_PADDLE2", "comment": "Lower or secondary paddle, under your left hand (e.g. Xbox Elite paddle P4, DualSense Edge left Fn button, Left Joy-Con SR button)" }, { "name": "SDL_GAMEPAD_BUTTON_TOUCHPAD", "comment": "PS4/PS5 touchpad button" }, { "name": "SDL_GAMEPAD_BUTTON_MISC2", "comment": "Additional button" }, { "name": "SDL_GAMEPAD_BUTTON_MISC3", "comment": "Additional button (e.g. Nintendo GameCube left trigger click)" }, { "name": "SDL_GAMEPAD_BUTTON_MISC4", "comment": "Additional button (e.g. Nintendo GameCube right trigger click)" }, { "name": "SDL_GAMEPAD_BUTTON_MISC5", "comment": "Additional button" }, { "name": "SDL_GAMEPAD_BUTTON_MISC6", "comment": "Additional button" }, { "name": "SDL_GAMEPAD_BUTTON_COUNT" } ] }, { "name": "SDL_GamepadButtonLabel", "values": [ { "name": "SDL_GAMEPAD_BUTTON_LABEL_UNKNOWN" }, { "name": "SDL_GAMEPAD_BUTTON_LABEL_A" }, { "name": "SDL_GAMEPAD_BUTTON_LABEL_B" }, { "name": "SDL_GAMEPAD_BUTTON_LABEL_X" }, { "name": "SDL_GAMEPAD_BUTTON_LABEL_Y" }, { "name": "SDL_GAMEPAD_BUTTON_LABEL_CROSS" }, { "name": "SDL_GAMEPAD_BUTTON_LABEL_CIRCLE" }, { "name": "SDL_GAMEPAD_BUTTON_LABEL_SQUARE" }, { "name": "SDL_GAMEPAD_BUTTON_LABEL_TRIANGLE" } ] }, { "name": "SDL_GamepadAxis", "values": [ { "name": "SDL_GAMEPAD_AXIS_LEFTX" }, { "name": "SDL_GAMEPAD_AXIS_LEFTY" }, { "name": "SDL_GAMEPAD_AXIS_RIGHTX" }, { "name": "SDL_GAMEPAD_AXIS_RIGHTY" }, { "name": "SDL_GAMEPAD_AXIS_LEFT_TRIGGER" }, { "name": "SDL_GAMEPAD_AXIS_RIGHT_TRIGGER" }, { "name": "SDL_GAMEPAD_AXIS_COUNT" } ] }, { "name": "SDL_GamepadBindingType", "values": [ { "name": "SDL_GAMEPAD_BINDTYPE_BUTTON" }, { "name": "SDL_GAMEPAD_BINDTYPE_AXIS" }, { "name": "SDL_GAMEPAD_BINDTYPE_HAT" } ] } ], "structs": [ { "name": "SDL_GamepadBinding", "fields": [ { "name": "input_type", "type": "SDL_GamepadBindingType" }, { "name": "button", "type": "int" }, { "name": "axis", "type": "int" }, { "name": "axis_min", "type": "int" }, { "name": "axis_max", "type": "int" }, { "name": "hat", "type": "int" }, { "name": "hat_mask", "type": "int" }, { "name": "output_type", "type": "SDL_GamepadBindingType" }, { "name": "button", "type": "SDL_GamepadButton" }, { "name": "axis", "type": "SDL_GamepadAxis" }, { "name": "axis_min", "type": "int" }, { "name": "axis_max", "type": "int" } ], "has_unions": true } ], "unions": [], "flags": [], "functions": [ { "name": "SDL_AddGamepadMapping", "return_type": "int", "parameters": [ { "name": "mapping", "type": "const char *" } ] }, { "name": "SDL_AddGamepadMappingsFromIO", "return_type": "int", "parameters": [ { "name": "src", "type": "SDL_IOStream *" }, { "name": "closeio", "type": "bool" } ] }, { "name": "SDL_AddGamepadMappingsFromFile", "return_type": "int", "parameters": [ { "name": "file", "type": "const char *" } ] }, { "name": "SDL_ReloadGamepadMappings", "return_type": "bool", "parameters": [] }, { "name": "SDL_GetGamepadMappings", "return_type": "char **", "parameters": [ { "name": "count", "type": "int *" } ] }, { "name": "SDL_GetGamepadMappingForGUID", "return_type": "char *", "parameters": [ { "name": "guid", "type": "SDL_GUID" } ] }, { "name": "SDL_GetGamepadMapping", "return_type": "char *", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" } ] }, { "name": "SDL_SetGamepadMapping", "return_type": "bool", "parameters": [ { "name": "instance_id", "type": "SDL_JoystickID" }, { "name": "mapping", "type": "const char *" } ] }, { "name": "SDL_HasGamepad", "return_type": "bool", "parameters": [] }, { "name": "SDL_GetGamepads", "return_type": "SDL_JoystickID *", "parameters": [ { "name": "count", "type": "int *" } ] }, { "name": "SDL_IsGamepad", "return_type": "bool", "parameters": [ { "name": "instance_id", "type": "SDL_JoystickID" } ] }, { "name": "SDL_GetGamepadNameForID", "return_type": "const char *", "parameters": [ { "name": "instance_id", "type": "SDL_JoystickID" } ] }, { "name": "SDL_GetGamepadPathForID", "return_type": "const char *", "parameters": [ { "name": "instance_id", "type": "SDL_JoystickID" } ] }, { "name": "SDL_GetGamepadPlayerIndexForID", "return_type": "int", "parameters": [ { "name": "instance_id", "type": "SDL_JoystickID" } ] }, { "name": "SDL_GetGamepadGUIDForID", "return_type": "SDL_GUID", "parameters": [ { "name": "instance_id", "type": "SDL_JoystickID" } ] }, { "name": "SDL_GetGamepadVendorForID", "return_type": "Uint16", "parameters": [ { "name": "instance_id", "type": "SDL_JoystickID" } ] }, { "name": "SDL_GetGamepadProductForID", "return_type": "Uint16", "parameters": [ { "name": "instance_id", "type": "SDL_JoystickID" } ] }, { "name": "SDL_GetGamepadProductVersionForID", "return_type": "Uint16", "parameters": [ { "name": "instance_id", "type": "SDL_JoystickID" } ] }, { "name": "SDL_GetGamepadTypeForID", "return_type": "SDL_GamepadType", "parameters": [ { "name": "instance_id", "type": "SDL_JoystickID" } ] }, { "name": "SDL_GetRealGamepadTypeForID", "return_type": "SDL_GamepadType", "parameters": [ { "name": "instance_id", "type": "SDL_JoystickID" } ] }, { "name": "SDL_GetGamepadMappingForID", "return_type": "char *", "parameters": [ { "name": "instance_id", "type": "SDL_JoystickID" } ] }, { "name": "SDL_OpenGamepad", "return_type": "SDL_Gamepad *", "parameters": [ { "name": "instance_id", "type": "SDL_JoystickID" } ] }, { "name": "SDL_GetGamepadFromID", "return_type": "SDL_Gamepad *", "parameters": [ { "name": "instance_id", "type": "SDL_JoystickID" } ] }, { "name": "SDL_GetGamepadFromPlayerIndex", "return_type": "SDL_Gamepad *", "parameters": [ { "name": "player_index", "type": "int" } ] }, { "name": "SDL_GetGamepadProperties", "return_type": "SDL_PropertiesID", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" } ] }, { "name": "SDL_GetGamepadID", "return_type": "SDL_JoystickID", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" } ] }, { "name": "SDL_GetGamepadName", "return_type": "const char *", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" } ] }, { "name": "SDL_GetGamepadPath", "return_type": "const char *", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" } ] }, { "name": "SDL_GetGamepadType", "return_type": "SDL_GamepadType", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" } ] }, { "name": "SDL_GetRealGamepadType", "return_type": "SDL_GamepadType", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" } ] }, { "name": "SDL_GetGamepadPlayerIndex", "return_type": "int", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" } ] }, { "name": "SDL_SetGamepadPlayerIndex", "return_type": "bool", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" }, { "name": "player_index", "type": "int" } ] }, { "name": "SDL_GetGamepadVendor", "return_type": "Uint16", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" } ] }, { "name": "SDL_GetGamepadProduct", "return_type": "Uint16", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" } ] }, { "name": "SDL_GetGamepadProductVersion", "return_type": "Uint16", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" } ] }, { "name": "SDL_GetGamepadFirmwareVersion", "return_type": "Uint16", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" } ] }, { "name": "SDL_GetGamepadSerial", "return_type": "const char *", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" } ] }, { "name": "SDL_GetGamepadSteamHandle", "return_type": "Uint64", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" } ] }, { "name": "SDL_GetGamepadConnectionState", "return_type": "SDL_JoystickConnectionState", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" } ] }, { "name": "SDL_GetGamepadPowerInfo", "return_type": "SDL_PowerState", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" }, { "name": "percent", "type": "int *" } ] }, { "name": "SDL_GamepadConnected", "return_type": "bool", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" } ] }, { "name": "SDL_GetGamepadJoystick", "return_type": "SDL_Joystick *", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" } ] }, { "name": "SDL_SetGamepadEventsEnabled", "return_type": "void", "parameters": [ { "name": "enabled", "type": "bool" } ] }, { "name": "SDL_GamepadEventsEnabled", "return_type": "bool", "parameters": [] }, { "name": "SDL_GetGamepadBindings", "return_type": "SDL_GamepadBinding **", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" }, { "name": "count", "type": "int *" } ] }, { "name": "SDL_UpdateGamepads", "return_type": "void", "parameters": [] }, { "name": "SDL_GetGamepadTypeFromString", "return_type": "SDL_GamepadType", "parameters": [ { "name": "str", "type": "const char *" } ] }, { "name": "SDL_GetGamepadStringForType", "return_type": "const char *", "parameters": [ { "name": "_type", "type": "SDL_GamepadType" } ] }, { "name": "SDL_GetGamepadAxisFromString", "return_type": "SDL_GamepadAxis", "parameters": [ { "name": "str", "type": "const char *" } ] }, { "name": "SDL_GetGamepadStringForAxis", "return_type": "const char *", "parameters": [ { "name": "axis", "type": "SDL_GamepadAxis" } ] }, { "name": "SDL_GamepadHasAxis", "return_type": "bool", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" }, { "name": "axis", "type": "SDL_GamepadAxis" } ] }, { "name": "SDL_GetGamepadAxis", "return_type": "Sint16", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" }, { "name": "axis", "type": "SDL_GamepadAxis" } ] }, { "name": "SDL_GetGamepadButtonFromString", "return_type": "SDL_GamepadButton", "parameters": [ { "name": "str", "type": "const char *" } ] }, { "name": "SDL_GetGamepadStringForButton", "return_type": "const char *", "parameters": [ { "name": "button", "type": "SDL_GamepadButton" } ] }, { "name": "SDL_GamepadHasButton", "return_type": "bool", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" }, { "name": "button", "type": "SDL_GamepadButton" } ] }, { "name": "SDL_GetGamepadButton", "return_type": "bool", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" }, { "name": "button", "type": "SDL_GamepadButton" } ] }, { "name": "SDL_GetGamepadButtonLabelForType", "return_type": "SDL_GamepadButtonLabel", "parameters": [ { "name": "_type", "type": "SDL_GamepadType" }, { "name": "button", "type": "SDL_GamepadButton" } ] }, { "name": "SDL_GetGamepadButtonLabel", "return_type": "SDL_GamepadButtonLabel", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" }, { "name": "button", "type": "SDL_GamepadButton" } ] }, { "name": "SDL_GetNumGamepadTouchpads", "return_type": "int", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" } ] }, { "name": "SDL_GetNumGamepadTouchpadFingers", "return_type": "int", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" }, { "name": "touchpad", "type": "int" } ] }, { "name": "SDL_GetGamepadTouchpadFinger", "return_type": "bool", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" }, { "name": "touchpad", "type": "int" }, { "name": "finger", "type": "int" }, { "name": "down", "type": "bool *" }, { "name": "x", "type": "float *" }, { "name": "y", "type": "float *" }, { "name": "pressure", "type": "float *" } ] }, { "name": "SDL_GamepadHasSensor", "return_type": "bool", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" }, { "name": "_type", "type": "SDL_SensorType" } ] }, { "name": "SDL_SetGamepadSensorEnabled", "return_type": "bool", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" }, { "name": "_type", "type": "SDL_SensorType" }, { "name": "enabled", "type": "bool" } ] }, { "name": "SDL_GamepadSensorEnabled", "return_type": "bool", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" }, { "name": "_type", "type": "SDL_SensorType" } ] }, { "name": "SDL_GetGamepadSensorDataRate", "return_type": "float", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" }, { "name": "_type", "type": "SDL_SensorType" } ] }, { "name": "SDL_GetGamepadSensorData", "return_type": "bool", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" }, { "name": "_type", "type": "SDL_SensorType" }, { "name": "data", "type": "float *" }, { "name": "num_values", "type": "int" } ] }, { "name": "SDL_RumbleGamepad", "return_type": "bool", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" }, { "name": "low_frequency_rumble", "type": "Uint16" }, { "name": "high_frequency_rumble", "type": "Uint16" }, { "name": "duration_ms", "type": "Uint32" } ] }, { "name": "SDL_RumbleGamepadTriggers", "return_type": "bool", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" }, { "name": "left_rumble", "type": "Uint16" }, { "name": "right_rumble", "type": "Uint16" }, { "name": "duration_ms", "type": "Uint32" } ] }, { "name": "SDL_SetGamepadLED", "return_type": "bool", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" }, { "name": "red", "type": "Uint8" }, { "name": "green", "type": "Uint8" }, { "name": "blue", "type": "Uint8" } ] }, { "name": "SDL_SendGamepadEffect", "return_type": "bool", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" }, { "name": "data", "type": "const void *" }, { "name": "size", "type": "int" } ] }, { "name": "SDL_CloseGamepad", "return_type": "void", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" } ] }, { "name": "SDL_GetGamepadAppleSFSymbolsNameForButton", "return_type": "const char *", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" }, { "name": "button", "type": "SDL_GamepadButton" } ] }, { "name": "SDL_GetGamepadAppleSFSymbolsNameForAxis", "return_type": "const char *", "parameters": [ { "name": "gamepad", "type": "SDL_Gamepad *" }, { "name": "axis", "type": "SDL_GamepadAxis" } ] } ] }