45#ifndef SDL_joystick_h_
46#define SDL_joystick_h_
74#ifdef SDL_THREAD_SAFETY_ANALYSIS
126#define SDL_IPHONE_MAX_GFORCE 5.0
407#define SDL_VIRTUAL_JOYSTICK_DESC_VERSION 1
824#define SDL_JOYSTICK_AXIS_MAX 32767
825#define SDL_JOYSTICK_AXIS_MIN -32768
873#define SDL_HAT_CENTERED 0x00
874#define SDL_HAT_UP 0x01
875#define SDL_HAT_RIGHT 0x02
876#define SDL_HAT_DOWN 0x04
877#define SDL_HAT_LEFT 0x08
878#define SDL_HAT_RIGHTUP (SDL_HAT_RIGHT|SDL_HAT_UP)
879#define SDL_HAT_RIGHTDOWN (SDL_HAT_RIGHT|SDL_HAT_DOWN)
880#define SDL_HAT_LEFTUP (SDL_HAT_LEFT|SDL_HAT_UP)
881#define SDL_HAT_LEFTDOWN (SDL_HAT_LEFT|SDL_HAT_DOWN)
930 int ball,
int *dx,
int *dy);
SDL_bool SDL_JoystickGetAxisInitialState(SDL_Joystick *joystick, int axis, Sint16 *state)
@ SDL_JOYSTICK_TYPE_DANCE_PAD
@ 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_GAMECONTROLLER
@ SDL_JOYSTICK_TYPE_DRUM_KIT
SDL_JoystickID SDL_JoystickGetDeviceInstanceID(int device_index)
Uint16 SDL_JoystickGetProductVersion(SDL_Joystick *joystick)
void SDL_UnlockJoysticks(void) SDL_RELEASE(SDL_joystick_lock)
int SDL_JoystickGetPlayerIndex(SDL_Joystick *joystick)
struct _SDL_Joystick SDL_Joystick
SDL_Joystick * SDL_JoystickFromPlayerIndex(int player_index)
int SDL_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms)
SDL_JoystickGUID SDL_JoystickGetDeviceGUID(int device_index)
Uint8 SDL_JoystickGetButton(SDL_Joystick *joystick, int button)
const char * SDL_JoystickPathForIndex(int device_index)
SDL_JoystickID SDL_JoystickInstanceID(SDL_Joystick *joystick)
int SDL_JoystickSetVirtualAxis(SDL_Joystick *joystick, int axis, Sint16 value)
@ SDL_JOYSTICK_POWER_FULL
@ SDL_JOYSTICK_POWER_MEDIUM
@ SDL_JOYSTICK_POWER_EMPTY
@ SDL_JOYSTICK_POWER_UNKNOWN
@ SDL_JOYSTICK_POWER_WIRED
SDL_bool SDL_JoystickHasLED(SDL_Joystick *joystick)
int SDL_JoystickGetBall(SDL_Joystick *joystick, int ball, int *dx, int *dy)
SDL_JoystickPowerLevel SDL_JoystickCurrentPowerLevel(SDL_Joystick *joystick)
SDL_bool SDL_JoystickIsVirtual(int device_index)
const char * SDL_JoystickNameForIndex(int device_index)
int SDL_JoystickSetVirtualButton(SDL_Joystick *joystick, int button, Uint8 value)
int SDL_NumJoysticks(void)
void SDL_JoystickSetPlayerIndex(SDL_Joystick *joystick, int player_index)
Uint16 SDL_JoystickGetDeviceProduct(int device_index)
Uint16 SDL_JoystickGetDeviceProductVersion(int device_index)
SDL_JoystickGUID SDL_JoystickGetGUIDFromString(const char *pchGUID)
const char * SDL_JoystickGetSerial(SDL_Joystick *joystick)
Uint16 SDL_JoystickGetDeviceVendor(int device_index)
SDL_Joystick * SDL_JoystickOpen(int device_index)
int SDL_JoystickNumBalls(SDL_Joystick *joystick)
SDL_bool SDL_JoystickHasRumbleTriggers(SDL_Joystick *joystick)
int SDL_JoystickNumHats(SDL_Joystick *joystick)
int SDL_JoystickSetVirtualHat(SDL_Joystick *joystick, int hat, Uint8 value)
void SDL_JoystickClose(SDL_Joystick *joystick)
SDL_JoystickGUID SDL_JoystickGetGUID(SDL_Joystick *joystick)
SDL_bool SDL_JoystickHasRumble(SDL_Joystick *joystick)
int SDL_JoystickGetDevicePlayerIndex(int device_index)
Uint16 SDL_JoystickGetFirmwareVersion(SDL_Joystick *joystick)
int SDL_JoystickDetachVirtual(int device_index)
SDL_bool SDL_JoystickGetAttached(SDL_Joystick *joystick)
Uint16 SDL_JoystickGetProduct(SDL_Joystick *joystick)
int SDL_JoystickAttachVirtualEx(const SDL_VirtualJoystickDesc *desc)
SDL_Joystick * SDL_JoystickFromInstanceID(SDL_JoystickID instance_id)
const char * SDL_JoystickPath(SDL_Joystick *joystick)
SDL_GUID SDL_JoystickGUID
Uint16 SDL_JoystickGetVendor(SDL_Joystick *joystick)
SDL_JoystickType SDL_JoystickGetType(SDL_Joystick *joystick)
void SDL_LockJoysticks(void) SDL_ACQUIRE(SDL_joystick_lock)
int SDL_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms)
void SDL_JoystickGetGUIDString(SDL_JoystickGUID guid, char *pszGUID, int cbGUID)
int SDL_JoystickAttachVirtual(SDL_JoystickType type, int naxes, int nbuttons, int nhats)
void SDL_GetJoystickGUIDInfo(SDL_JoystickGUID guid, Uint16 *vendor, Uint16 *product, Uint16 *version, Uint16 *crc16)
Uint8 SDL_JoystickGetHat(SDL_Joystick *joystick, int hat)
void SDL_JoystickUpdate(void)
int SDL_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue)
int SDL_JoystickEventState(int state)
SDL_JoystickType SDL_JoystickGetDeviceType(int device_index)
int SDL_JoystickNumAxes(SDL_Joystick *joystick)
int SDL_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size)
const char * SDL_JoystickName(SDL_Joystick *joystick)
Sint16 SDL_JoystickGetAxis(SDL_Joystick *joystick, int axis)
int SDL_JoystickNumButtons(SDL_Joystick *joystick)
struct SDL_mutex SDL_mutex
void(* SetPlayerIndex)(void *userdata, int player_index)
int(* SetLED)(void *userdata, Uint8 red, Uint8 green, Uint8 blue)
void(* Update)(void *userdata)
int(* SendEffect)(void *userdata, const void *data, int size)
int(* RumbleTriggers)(void *userdata, Uint16 left_rumble, Uint16 right_rumble)
int(* Rumble)(void *userdata, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble)