sdlparser-scrap/json/joystick.json

961 lines
20 KiB
JSON

{
"header": "SDL_joystick.h",
"opaque_types": [
{
"name": "SDL_Joystick"
}
],
"typedefs": [
{
"name": "SDL_JoystickID",
"underlying_type": "Uint32"
}
],
"function_pointers": [],
"c_type_aliases": [],
"enums": [
{
"name": "SDL_JoystickType",
"values": [
{
"name": "SDL_JOYSTICK_TYPE_UNKNOWN"
},
{
"name": "SDL_JOYSTICK_TYPE_GAMEPAD"
},
{
"name": "SDL_JOYSTICK_TYPE_WHEEL"
},
{
"name": "SDL_JOYSTICK_TYPE_ARCADE_STICK"
},
{
"name": "SDL_JOYSTICK_TYPE_FLIGHT_STICK"
},
{
"name": "SDL_JOYSTICK_TYPE_DANCE_PAD"
},
{
"name": "SDL_JOYSTICK_TYPE_GUITAR"
},
{
"name": "SDL_JOYSTICK_TYPE_DRUM_KIT"
},
{
"name": "SDL_JOYSTICK_TYPE_ARCADE_PAD"
},
{
"name": "SDL_JOYSTICK_TYPE_THROTTLE"
},
{
"name": "SDL_JOYSTICK_TYPE_COUNT"
}
]
},
{
"name": "SDL_JoystickConnectionState",
"values": [
{
"name": "SDL_JOYSTICK_CONNECTION_UNKNOWN"
},
{
"name": "SDL_JOYSTICK_CONNECTION_WIRED"
},
{
"name": "SDL_JOYSTICK_CONNECTION_WIRELESS"
}
]
}
],
"structs": [
{
"name": "SDL_VirtualJoystickTouchpadDesc",
"fields": [
{
"name": "nfingers",
"type": "Uint16",
"comment": "the number of simultaneous fingers on this touchpad"
},
{
"name": "padding",
"type": "Uint16[3]"
}
]
},
{
"name": "SDL_VirtualJoystickSensorDesc",
"fields": [
{
"name": "_type",
"type": "SDL_SensorType",
"comment": "the type of this sensor"
},
{
"name": "rate",
"type": "float",
"comment": "the update frequency of this sensor, may be 0.0f"
}
]
},
{
"name": "SDL_VirtualJoystickDesc",
"fields": [
{
"name": "version",
"type": "Uint32",
"comment": "the version of this interface"
},
{
"name": "_type",
"type": "Uint16",
"comment": "`SDL_JoystickType`"
},
{
"name": "padding",
"type": "Uint16",
"comment": "unused"
},
{
"name": "vendor_id",
"type": "Uint16",
"comment": "the USB vendor ID of this joystick"
},
{
"name": "product_id",
"type": "Uint16",
"comment": "the USB product ID of this joystick"
},
{
"name": "naxes",
"type": "Uint16",
"comment": "the number of axes on this joystick"
},
{
"name": "nbuttons",
"type": "Uint16",
"comment": "the number of buttons on this joystick"
},
{
"name": "nballs",
"type": "Uint16",
"comment": "the number of balls on this joystick"
},
{
"name": "nhats",
"type": "Uint16",
"comment": "the number of hats on this joystick"
},
{
"name": "ntouchpads",
"type": "Uint16",
"comment": "the number of touchpads on this joystick, requires `touchpads` to point at valid descriptions"
},
{
"name": "nsensors",
"type": "Uint16",
"comment": "the number of sensors on this joystick, requires `sensors` to point at valid descriptions"
},
{
"name": "padding2",
"type": "Uint16[2]",
"comment": "unused"
},
{
"name": "name",
"type": "const char *",
"comment": "the name of the joystick"
},
{
"name": "touchpads",
"type": "const SDL_VirtualJoystickTouchpadDesc *",
"comment": "A pointer to an array of touchpad descriptions, required if `ntouchpads` is > 0"
},
{
"name": "sensors",
"type": "const SDL_VirtualJoystickSensorDesc *",
"comment": "A pointer to an array of sensor descriptions, required if `nsensors` is > 0"
},
{
"name": "userdata",
"type": "void *",
"comment": "User data pointer passed to callbacks"
},
{
"name": "Update",
"type": "void (SDLCALL *Update)(void *userdata)",
"comment": "Called when the joystick state should be updated"
},
{
"name": "SetPlayerIndex",
"type": "void (SDLCALL *SetPlayerIndex)(void *userdata, int player_index)",
"comment": "Called when the player index is set"
},
{
"name": "Rumble",
"type": "bool (SDLCALL *Rumble)(void *userdata, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble)",
"comment": "Implements SDL_RumbleJoystick()"
},
{
"name": "RumbleTriggers",
"type": "bool (SDLCALL *RumbleTriggers)(void *userdata, Uint16 left_rumble, Uint16 right_rumble)",
"comment": "Implements SDL_RumbleJoystickTriggers()"
},
{
"name": "SetLED",
"type": "bool (SDLCALL *SetLED)(void *userdata, Uint8 red, Uint8 green, Uint8 blue)",
"comment": "Implements SDL_SetJoystickLED()"
},
{
"name": "SendEffect",
"type": "bool (SDLCALL *SendEffect)(void *userdata, const void *data, int size)",
"comment": "Implements SDL_SendJoystickEffect()"
},
{
"name": "SetSensorsEnabled",
"type": "bool (SDLCALL *SetSensorsEnabled)(void *userdata, bool enabled)",
"comment": "Implements SDL_SetGamepadSensorEnabled()"
},
{
"name": "Cleanup",
"type": "void (SDLCALL *Cleanup)(void *userdata)",
"comment": "Cleans up the userdata when the joystick is detached"
}
]
}
],
"unions": [],
"flags": [],
"functions": [
{
"name": "SDL_LockJoysticks",
"return_type": "void",
"parameters": []
},
{
"name": "SDL_UnlockJoysticks",
"return_type": "void",
"parameters": []
},
{
"name": "SDL_HasJoystick",
"return_type": "bool",
"parameters": []
},
{
"name": "SDL_GetJoysticks",
"return_type": "SDL_JoystickID *",
"parameters": [
{
"name": "count",
"type": "int *"
}
]
},
{
"name": "SDL_GetJoystickNameForID",
"return_type": "const char *",
"parameters": [
{
"name": "instance_id",
"type": "SDL_JoystickID"
}
]
},
{
"name": "SDL_GetJoystickPathForID",
"return_type": "const char *",
"parameters": [
{
"name": "instance_id",
"type": "SDL_JoystickID"
}
]
},
{
"name": "SDL_GetJoystickPlayerIndexForID",
"return_type": "int",
"parameters": [
{
"name": "instance_id",
"type": "SDL_JoystickID"
}
]
},
{
"name": "SDL_GetJoystickGUIDForID",
"return_type": "SDL_GUID",
"parameters": [
{
"name": "instance_id",
"type": "SDL_JoystickID"
}
]
},
{
"name": "SDL_GetJoystickVendorForID",
"return_type": "Uint16",
"parameters": [
{
"name": "instance_id",
"type": "SDL_JoystickID"
}
]
},
{
"name": "SDL_GetJoystickProductForID",
"return_type": "Uint16",
"parameters": [
{
"name": "instance_id",
"type": "SDL_JoystickID"
}
]
},
{
"name": "SDL_GetJoystickProductVersionForID",
"return_type": "Uint16",
"parameters": [
{
"name": "instance_id",
"type": "SDL_JoystickID"
}
]
},
{
"name": "SDL_GetJoystickTypeForID",
"return_type": "SDL_JoystickType",
"parameters": [
{
"name": "instance_id",
"type": "SDL_JoystickID"
}
]
},
{
"name": "SDL_OpenJoystick",
"return_type": "SDL_Joystick *",
"parameters": [
{
"name": "instance_id",
"type": "SDL_JoystickID"
}
]
},
{
"name": "SDL_GetJoystickFromID",
"return_type": "SDL_Joystick *",
"parameters": [
{
"name": "instance_id",
"type": "SDL_JoystickID"
}
]
},
{
"name": "SDL_GetJoystickFromPlayerIndex",
"return_type": "SDL_Joystick *",
"parameters": [
{
"name": "player_index",
"type": "int"
}
]
},
{
"name": "SDL_AttachVirtualJoystick",
"return_type": "SDL_JoystickID",
"parameters": [
{
"name": "desc",
"type": "const SDL_VirtualJoystickDesc *"
}
]
},
{
"name": "SDL_DetachVirtualJoystick",
"return_type": "bool",
"parameters": [
{
"name": "instance_id",
"type": "SDL_JoystickID"
}
]
},
{
"name": "SDL_IsJoystickVirtual",
"return_type": "bool",
"parameters": [
{
"name": "instance_id",
"type": "SDL_JoystickID"
}
]
},
{
"name": "SDL_SetJoystickVirtualAxis",
"return_type": "bool",
"parameters": [
{
"name": "joystick",
"type": "SDL_Joystick *"
},
{
"name": "axis",
"type": "int"
},
{
"name": "value",
"type": "Sint16"
}
]
},
{
"name": "SDL_SetJoystickVirtualBall",
"return_type": "bool",
"parameters": [
{
"name": "joystick",
"type": "SDL_Joystick *"
},
{
"name": "ball",
"type": "int"
},
{
"name": "xrel",
"type": "Sint16"
},
{
"name": "yrel",
"type": "Sint16"
}
]
},
{
"name": "SDL_SetJoystickVirtualButton",
"return_type": "bool",
"parameters": [
{
"name": "joystick",
"type": "SDL_Joystick *"
},
{
"name": "button",
"type": "int"
},
{
"name": "down",
"type": "bool"
}
]
},
{
"name": "SDL_SetJoystickVirtualHat",
"return_type": "bool",
"parameters": [
{
"name": "joystick",
"type": "SDL_Joystick *"
},
{
"name": "hat",
"type": "int"
},
{
"name": "value",
"type": "Uint8"
}
]
},
{
"name": "SDL_SetJoystickVirtualTouchpad",
"return_type": "bool",
"parameters": [
{
"name": "joystick",
"type": "SDL_Joystick *"
},
{
"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_SendJoystickVirtualSensorData",
"return_type": "bool",
"parameters": [
{
"name": "joystick",
"type": "SDL_Joystick *"
},
{
"name": "_type",
"type": "SDL_SensorType"
},
{
"name": "sensor_timestamp",
"type": "Uint64"
},
{
"name": "data",
"type": "const float *"
},
{
"name": "num_values",
"type": "int"
}
]
},
{
"name": "SDL_GetJoystickProperties",
"return_type": "SDL_PropertiesID",
"parameters": [
{
"name": "joystick",
"type": "SDL_Joystick *"
}
]
},
{
"name": "SDL_GetJoystickName",
"return_type": "const char *",
"parameters": [
{
"name": "joystick",
"type": "SDL_Joystick *"
}
]
},
{
"name": "SDL_GetJoystickPath",
"return_type": "const char *",
"parameters": [
{
"name": "joystick",
"type": "SDL_Joystick *"
}
]
},
{
"name": "SDL_GetJoystickPlayerIndex",
"return_type": "int",
"parameters": [
{
"name": "joystick",
"type": "SDL_Joystick *"
}
]
},
{
"name": "SDL_SetJoystickPlayerIndex",
"return_type": "bool",
"parameters": [
{
"name": "joystick",
"type": "SDL_Joystick *"
},
{
"name": "player_index",
"type": "int"
}
]
},
{
"name": "SDL_GetJoystickGUID",
"return_type": "SDL_GUID",
"parameters": [
{
"name": "joystick",
"type": "SDL_Joystick *"
}
]
},
{
"name": "SDL_GetJoystickVendor",
"return_type": "Uint16",
"parameters": [
{
"name": "joystick",
"type": "SDL_Joystick *"
}
]
},
{
"name": "SDL_GetJoystickProduct",
"return_type": "Uint16",
"parameters": [
{
"name": "joystick",
"type": "SDL_Joystick *"
}
]
},
{
"name": "SDL_GetJoystickProductVersion",
"return_type": "Uint16",
"parameters": [
{
"name": "joystick",
"type": "SDL_Joystick *"
}
]
},
{
"name": "SDL_GetJoystickFirmwareVersion",
"return_type": "Uint16",
"parameters": [
{
"name": "joystick",
"type": "SDL_Joystick *"
}
]
},
{
"name": "SDL_GetJoystickSerial",
"return_type": "const char *",
"parameters": [
{
"name": "joystick",
"type": "SDL_Joystick *"
}
]
},
{
"name": "SDL_GetJoystickType",
"return_type": "SDL_JoystickType",
"parameters": [
{
"name": "joystick",
"type": "SDL_Joystick *"
}
]
},
{
"name": "SDL_GetJoystickGUIDInfo",
"return_type": "void",
"parameters": [
{
"name": "guid",
"type": "SDL_GUID"
},
{
"name": "vendor",
"type": "Uint16 *"
},
{
"name": "product",
"type": "Uint16 *"
},
{
"name": "version",
"type": "Uint16 *"
},
{
"name": "crc16",
"type": "Uint16 *"
}
]
},
{
"name": "SDL_JoystickConnected",
"return_type": "bool",
"parameters": [
{
"name": "joystick",
"type": "SDL_Joystick *"
}
]
},
{
"name": "SDL_GetJoystickID",
"return_type": "SDL_JoystickID",
"parameters": [
{
"name": "joystick",
"type": "SDL_Joystick *"
}
]
},
{
"name": "SDL_GetNumJoystickAxes",
"return_type": "int",
"parameters": [
{
"name": "joystick",
"type": "SDL_Joystick *"
}
]
},
{
"name": "SDL_GetNumJoystickBalls",
"return_type": "int",
"parameters": [
{
"name": "joystick",
"type": "SDL_Joystick *"
}
]
},
{
"name": "SDL_GetNumJoystickHats",
"return_type": "int",
"parameters": [
{
"name": "joystick",
"type": "SDL_Joystick *"
}
]
},
{
"name": "SDL_GetNumJoystickButtons",
"return_type": "int",
"parameters": [
{
"name": "joystick",
"type": "SDL_Joystick *"
}
]
},
{
"name": "SDL_SetJoystickEventsEnabled",
"return_type": "void",
"parameters": [
{
"name": "enabled",
"type": "bool"
}
]
},
{
"name": "SDL_JoystickEventsEnabled",
"return_type": "bool",
"parameters": []
},
{
"name": "SDL_UpdateJoysticks",
"return_type": "void",
"parameters": []
},
{
"name": "SDL_GetJoystickAxis",
"return_type": "Sint16",
"parameters": [
{
"name": "joystick",
"type": "SDL_Joystick *"
},
{
"name": "axis",
"type": "int"
}
]
},
{
"name": "SDL_GetJoystickAxisInitialState",
"return_type": "bool",
"parameters": [
{
"name": "joystick",
"type": "SDL_Joystick *"
},
{
"name": "axis",
"type": "int"
},
{
"name": "state",
"type": "Sint16 *"
}
]
},
{
"name": "SDL_GetJoystickBall",
"return_type": "bool",
"parameters": [
{
"name": "joystick",
"type": "SDL_Joystick *"
},
{
"name": "ball",
"type": "int"
},
{
"name": "dx",
"type": "int *"
},
{
"name": "dy",
"type": "int *"
}
]
},
{
"name": "SDL_GetJoystickHat",
"return_type": "Uint8",
"parameters": [
{
"name": "joystick",
"type": "SDL_Joystick *"
},
{
"name": "hat",
"type": "int"
}
]
},
{
"name": "SDL_GetJoystickButton",
"return_type": "bool",
"parameters": [
{
"name": "joystick",
"type": "SDL_Joystick *"
},
{
"name": "button",
"type": "int"
}
]
},
{
"name": "SDL_RumbleJoystick",
"return_type": "bool",
"parameters": [
{
"name": "joystick",
"type": "SDL_Joystick *"
},
{
"name": "low_frequency_rumble",
"type": "Uint16"
},
{
"name": "high_frequency_rumble",
"type": "Uint16"
},
{
"name": "duration_ms",
"type": "Uint32"
}
]
},
{
"name": "SDL_RumbleJoystickTriggers",
"return_type": "bool",
"parameters": [
{
"name": "joystick",
"type": "SDL_Joystick *"
},
{
"name": "left_rumble",
"type": "Uint16"
},
{
"name": "right_rumble",
"type": "Uint16"
},
{
"name": "duration_ms",
"type": "Uint32"
}
]
},
{
"name": "SDL_SetJoystickLED",
"return_type": "bool",
"parameters": [
{
"name": "joystick",
"type": "SDL_Joystick *"
},
{
"name": "red",
"type": "Uint8"
},
{
"name": "green",
"type": "Uint8"
},
{
"name": "blue",
"type": "Uint8"
}
]
},
{
"name": "SDL_SendJoystickEffect",
"return_type": "bool",
"parameters": [
{
"name": "joystick",
"type": "SDL_Joystick *"
},
{
"name": "data",
"type": "const void *"
},
{
"name": "size",
"type": "int"
}
]
},
{
"name": "SDL_CloseJoystick",
"return_type": "void",
"parameters": [
{
"name": "joystick",
"type": "SDL_Joystick *"
}
]
},
{
"name": "SDL_GetJoystickConnectionState",
"return_type": "SDL_JoystickConnectionState",
"parameters": [
{
"name": "joystick",
"type": "SDL_Joystick *"
}
]
},
{
"name": "SDL_GetJoystickPowerInfo",
"return_type": "SDL_PowerState",
"parameters": [
{
"name": "joystick",
"type": "SDL_Joystick *"
},
{
"name": "percent",
"type": "int *"
}
]
}
]
}