53#ifndef SDL_joystick_h_
54#define SDL_joystick_h_
70#ifdef SDL_THREAD_SAFETY_ANALYSIS
150#define SDL_JOYSTICK_AXIS_MAX 32767
161#define SDL_JOYSTICK_AXIS_MIN -32768
655#define SDL_PROP_JOYSTICK_CAP_MONO_LED_BOOLEAN "SDL.joystick.cap.mono_led"
656#define SDL_PROP_JOYSTICK_CAP_RGB_LED_BOOLEAN "SDL.joystick.cap.rgb_led"
657#define SDL_PROP_JOYSTICK_CAP_PLAYER_LED_BOOLEAN "SDL.joystick.cap.player_led"
658#define SDL_PROP_JOYSTICK_CAP_RUMBLE_BOOLEAN "SDL.joystick.cap.rumble"
659#define SDL_PROP_JOYSTICK_CAP_TRIGGER_RUMBLE_BOOLEAN "SDL.joystick.cap.trigger_rumble"
1045#define SDL_HAT_CENTERED 0x00u
1046#define SDL_HAT_UP 0x01u
1047#define SDL_HAT_RIGHT 0x02u
1048#define SDL_HAT_DOWN 0x04u
1049#define SDL_HAT_LEFT 0x08u
1050#define SDL_HAT_RIGHTUP (SDL_HAT_RIGHT|SDL_HAT_UP)
1051#define SDL_HAT_RIGHTDOWN (SDL_HAT_RIGHT|SDL_HAT_DOWN)
1052#define SDL_HAT_LEFTUP (SDL_HAT_LEFT|SDL_HAT_UP)
1053#define SDL_HAT_LEFTDOWN (SDL_HAT_LEFT|SDL_HAT_DOWN)
bool SDL_GetJoystickButton(SDL_Joystick *joystick, int button)
@ SDL_JOYSTICK_TYPE_DANCE_PAD
@ SDL_JOYSTICK_TYPE_GAMEPAD
@ SDL_JOYSTICK_TYPE_COUNT
@ SDL_JOYSTICK_TYPE_ARCADE_PAD
@ SDL_JOYSTICK_TYPE_UNKNOWN
@ SDL_JOYSTICK_TYPE_ARCADE_STICK
@ SDL_JOYSTICK_TYPE_WHEEL
@ SDL_JOYSTICK_TYPE_THROTTLE
@ SDL_JOYSTICK_TYPE_GUITAR
@ SDL_JOYSTICK_TYPE_FLIGHT_STICK
@ SDL_JOYSTICK_TYPE_DRUM_KIT
void SDL_UnlockJoysticks(void) SDL_RELEASE(SDL_joystick_lock)
SDL_Joystick * SDL_OpenJoystick(SDL_JoystickID instance_id)
void SDL_UpdateJoysticks(void)
bool SDL_RumbleJoystick(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms)
bool SDL_SetJoystickVirtualTouchpad(SDL_Joystick *joystick, int touchpad, int finger, bool down, float x, float y, float pressure)
SDL_Joystick * SDL_GetJoystickFromID(SDL_JoystickID instance_id)
Uint16 SDL_GetJoystickVendor(SDL_Joystick *joystick)
SDL_PowerState SDL_GetJoystickPowerInfo(SDL_Joystick *joystick, int *percent)
SDL_JoystickID * SDL_GetJoysticks(int *count)
const char * SDL_GetJoystickPathForID(SDL_JoystickID instance_id)
Uint16 SDL_GetJoystickProductForID(SDL_JoystickID instance_id)
bool SDL_JoystickConnected(SDL_Joystick *joystick)
Uint16 SDL_GetJoystickProductVersion(SDL_Joystick *joystick)
const char * SDL_GetJoystickPath(SDL_Joystick *joystick)
bool SDL_SetJoystickVirtualButton(SDL_Joystick *joystick, int button, bool down)
SDL_JoystickID SDL_AttachVirtualJoystick(const SDL_VirtualJoystickDesc *desc)
void SDL_SetJoystickEventsEnabled(bool enabled)
SDL_JoystickID SDL_GetJoystickID(SDL_Joystick *joystick)
SDL_COMPILE_TIME_ASSERT(SDL_VirtualJoystickDesc_SIZE,(sizeof(void *)==4 &&sizeof(SDL_VirtualJoystickDesc)==84)||(sizeof(void *)==8 &&sizeof(SDL_VirtualJoystickDesc)==136))
int SDL_GetJoystickPlayerIndexForID(SDL_JoystickID instance_id)
struct SDL_Joystick SDL_Joystick
bool SDL_DetachVirtualJoystick(SDL_JoystickID instance_id)
int SDL_GetNumJoystickHats(SDL_Joystick *joystick)
bool SDL_JoystickEventsEnabled(void)
SDL_GUID SDL_GetJoystickGUID(SDL_Joystick *joystick)
SDL_PropertiesID SDL_GetJoystickProperties(SDL_Joystick *joystick)
Uint16 SDL_GetJoystickProductVersionForID(SDL_JoystickID instance_id)
Uint16 SDL_GetJoystickProduct(SDL_Joystick *joystick)
SDL_JoystickType SDL_GetJoystickType(SDL_Joystick *joystick)
SDL_JoystickConnectionState SDL_GetJoystickConnectionState(SDL_Joystick *joystick)
bool SDL_SendJoystickVirtualSensorData(SDL_Joystick *joystick, SDL_SensorType type, Uint64 sensor_timestamp, const float *data, int num_values)
bool SDL_SetJoystickLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue)
Uint16 SDL_GetJoystickVendorForID(SDL_JoystickID instance_id)
int SDL_GetNumJoystickBalls(SDL_Joystick *joystick)
bool SDL_SetJoystickVirtualAxis(SDL_Joystick *joystick, int axis, Sint16 value)
bool SDL_RumbleJoystickTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms)
int SDL_GetNumJoystickButtons(SDL_Joystick *joystick)
void SDL_CloseJoystick(SDL_Joystick *joystick)
int SDL_GetNumJoystickAxes(SDL_Joystick *joystick)
void SDL_LockJoysticks(void) SDL_ACQUIRE(SDL_joystick_lock)
bool SDL_GetJoystickBall(SDL_Joystick *joystick, int ball, int *dx, int *dy)
bool SDL_HasJoystick(void)
SDL_JoystickConnectionState
@ SDL_JOYSTICK_CONNECTION_INVALID
@ SDL_JOYSTICK_CONNECTION_UNKNOWN
@ SDL_JOYSTICK_CONNECTION_WIRELESS
@ SDL_JOYSTICK_CONNECTION_WIRED
bool SDL_SetJoystickVirtualHat(SDL_Joystick *joystick, int hat, Uint8 value)
SDL_JoystickType SDL_GetJoystickTypeForID(SDL_JoystickID instance_id)
bool SDL_SendJoystickEffect(SDL_Joystick *joystick, const void *data, int size)
bool SDL_SetJoystickVirtualBall(SDL_Joystick *joystick, int ball, Sint16 xrel, Sint16 yrel)
bool SDL_GetJoystickAxisInitialState(SDL_Joystick *joystick, int axis, Sint16 *state)
const char * SDL_GetJoystickSerial(SDL_Joystick *joystick)
void SDL_GetJoystickGUIDInfo(SDL_GUID guid, Uint16 *vendor, Uint16 *product, Uint16 *version, Uint16 *crc16)
bool SDL_IsJoystickVirtual(SDL_JoystickID instance_id)
Uint8 SDL_GetJoystickHat(SDL_Joystick *joystick, int hat)
SDL_GUID SDL_GetJoystickGUIDForID(SDL_JoystickID instance_id)
Uint16 SDL_GetJoystickFirmwareVersion(SDL_Joystick *joystick)
Sint16 SDL_GetJoystickAxis(SDL_Joystick *joystick, int axis)
int SDL_GetJoystickPlayerIndex(SDL_Joystick *joystick)
const char * SDL_GetJoystickName(SDL_Joystick *joystick)
bool SDL_SetJoystickPlayerIndex(SDL_Joystick *joystick, int player_index)
SDL_Joystick * SDL_GetJoystickFromPlayerIndex(int player_index)
const char * SDL_GetJoystickNameForID(SDL_JoystickID instance_id)
struct SDL_Mutex SDL_Mutex
const SDL_VirtualJoystickTouchpadDesc * touchpads
void(* Cleanup)(void *userdata)
void(* SetPlayerIndex)(void *userdata, int player_index)
const SDL_VirtualJoystickSensorDesc * sensors
bool(* SetLED)(void *userdata, Uint8 red, Uint8 green, Uint8 blue)
void(* Update)(void *userdata)
bool(* RumbleTriggers)(void *userdata, Uint16 left_rumble, Uint16 right_rumble)
bool(* SetSensorsEnabled)(void *userdata, bool enabled)
bool(* Rumble)(void *userdata, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble)
bool(* SendEffect)(void *userdata, const void *data, int size)