#ifndef SDL_joystick_c_h_
#define SDL_joystick_c_h_
#include "SDL_internal.h"
#ifdef __cplusplus
extern "C" {
#endif
struct SDL_JoystickDriver;
struct SDL_SteamVirtualGamepadInfo;
extern bool SDL_InitJoysticks(void);
extern void SDL_QuitJoysticks(void);
extern bool SDL_JoysticksInitialized(void);
extern bool SDL_JoysticksQuitting(void);
extern bool SDL_JoysticksLocked(void);
extern void SDL_AssertJoysticksLocked(void) SDL_ASSERT_CAPABILITY(SDL_joystick_lock);
extern bool SDL_JoysticksOpened(void);
extern bool SDL_JoystickHandledByAnotherDriver(struct SDL_JoystickDriver *driver, Uint16 vendor_id, Uint16 product_id, Uint16 version, const char *name);
extern char *SDL_CreateJoystickName(Uint16 vendor, Uint16 product, const char *vendor_name, const char *product_name);
extern SDL_GUID SDL_CreateJoystickGUID(Uint16 bus, Uint16 vendor, Uint16 product, Uint16 version, const char *vendor_name, const char *product_name, Uint8 driver_signature, Uint8 driver_data);
extern SDL_GUID SDL_CreateJoystickGUIDForName(const char *name);
extern void SDL_SetJoystickGUIDVendor(SDL_GUID *guid, Uint16 vendor);
extern void SDL_SetJoystickGUIDProduct(SDL_GUID *guid, Uint16 product);
extern void SDL_SetJoystickGUIDVersion(SDL_GUID *guid, Uint16 version);
extern void SDL_SetJoystickGUIDCRC(SDL_GUID *guid, Uint16 crc);
extern SDL_GamepadType SDL_GetGamepadTypeFromVIDPID(Uint16 vendor, Uint16 product, const char *name, bool forUI);
extern SDL_GamepadType SDL_GetGamepadTypeFromGUID(SDL_GUID guid, const char *name);
extern bool SDL_JoystickGUIDUsesVersion(SDL_GUID guid);
extern bool SDL_IsJoystickXboxOne(Uint16 vendor_id, Uint16 product_id);
extern bool SDL_IsJoystickXboxOneElite(Uint16 vendor_id, Uint16 product_id);
extern bool SDL_IsJoystickXboxSeriesX(Uint16 vendor_id, Uint16 product_id);
extern bool SDL_IsJoystickBluetoothXboxOne(Uint16 vendor_id, Uint16 product_id);
extern bool SDL_IsJoystickPS4(Uint16 vendor_id, Uint16 product_id);
extern bool SDL_IsJoystickPS5(Uint16 vendor_id, Uint16 product_id);
extern bool SDL_IsJoystickDualSenseEdge(Uint16 vendor_id, Uint16 product_id);
extern bool SDL_IsJoystickNintendoSwitchPro(Uint16 vendor_id, Uint16 product_id);
extern bool SDL_IsJoystickNintendoSwitchProInputOnly(Uint16 vendor_id, Uint16 product_id);
extern bool SDL_IsJoystickNintendoSwitchJoyCon(Uint16 vendor_id, Uint16 product_id);
extern bool SDL_IsJoystickNintendoSwitchJoyConLeft(Uint16 vendor_id, Uint16 product_id);
extern bool SDL_IsJoystickNintendoSwitchJoyConRight(Uint16 vendor_id, Uint16 product_id);
extern bool SDL_IsJoystickNintendoSwitchJoyConGrip(Uint16 vendor_id, Uint16 product_id);
extern bool SDL_IsJoystickNintendoSwitchJoyConPair(Uint16 vendor_id, Uint16 product_id);
extern bool SDL_IsJoystickGameCube(Uint16 vendor_id, Uint16 product_id);
extern bool SDL_IsJoystickAmazonLunaController(Uint16 vendor_id, Uint16 product_id);
extern bool SDL_IsJoystickGoogleStadiaController(Uint16 vendor_id, Uint16 product_id);
extern bool SDL_IsJoystickNVIDIASHIELDController(Uint16 vendor_id, Uint16 product_id);
extern bool SDL_IsJoystickSteamVirtualGamepad(Uint16 vendor_id, Uint16 product_id, Uint16 version);
extern bool SDL_IsJoystickSteamController(Uint16 vendor_id, Uint16 product_id);
extern bool SDL_IsJoystickHoriSteamController(Uint16 vendor_id, Uint16 product_id);
extern bool SDL_IsJoystickSInputController(Uint16 vendor_id, Uint16 product_id);
extern bool SDL_IsJoystickFlydigiController(Uint16 vendor_id, Uint16 product_id);
extern bool SDL_IsJoystickSteamDeck(Uint16 vendor_id, Uint16 product_id);
extern bool SDL_IsJoystickSteamTriton(Uint16 vendor_id, Uint16 product_id);
extern bool SDL_IsJoystickXInput(SDL_GUID guid);
extern bool SDL_IsJoystickWGI(SDL_GUID guid);
extern bool SDL_IsJoystickHIDAPI(SDL_GUID guid);
extern bool SDL_IsJoystickMFI(SDL_GUID guid);
extern bool SDL_IsJoystickRAWINPUT(SDL_GUID guid);
extern bool SDL_IsJoystickVIRTUAL(SDL_GUID guid);
bool SDL_IsJoystickWheel(Uint16 vendor_id, Uint16 product_id);
extern bool SDL_ShouldIgnoreJoystick(Uint16 vendor_id, Uint16 product_id, Uint16 version, const char *name);
extern void SDL_PrivateJoystickAddTouchpad(SDL_Joystick *joystick, int nfingers);
extern void SDL_PrivateJoystickAddSensor(SDL_Joystick *joystick, SDL_SensorType type, float rate);
extern void SDL_PrivateJoystickSensorRate(SDL_Joystick *joystick, SDL_SensorType type, float rate);
extern void SDL_PrivateJoystickAdded(SDL_JoystickID instance_id);
extern bool SDL_IsJoystickBeingAdded(void);
extern void SDL_PrivateJoystickRemoved(SDL_JoystickID instance_id);
extern void SDL_PrivateJoystickForceRecentering(SDL_Joystick *joystick);
extern void SDL_SendJoystickAxis(Uint64 timestamp, SDL_Joystick *joystick, Uint8 axis, Sint16 value);
extern void SDL_SendJoystickBall(Uint64 timestamp, SDL_Joystick *joystick, Uint8 ball, Sint16 xrel, Sint16 yrel);
extern void SDL_SendJoystickHat(Uint64 timestamp, SDL_Joystick *joystick, Uint8 hat, Uint8 value);
extern void SDL_SendJoystickButton(Uint64 timestamp, SDL_Joystick *joystick, Uint8 button, bool down);
extern void SDL_SendJoystickTouchpad(Uint64 timestamp, SDL_Joystick *joystick, int touchpad, int finger, bool down, float x, float y, float pressure);
extern void SDL_SendJoystickSensor(Uint64 timestamp, SDL_Joystick *joystick, SDL_SensorType type, Uint64 sensor_timestamp, const float *data, int num_values);
extern void SDL_SendJoystickPowerInfo(SDL_Joystick *joystick, SDL_PowerState state, int percent);
extern const struct SDL_SteamVirtualGamepadInfo *SDL_GetJoystickVirtualGamepadInfoForID(SDL_JoystickID instance_id);
extern bool SDL_IsJoystickValid(SDL_Joystick *joystick);
typedef enum
{
EMappingKind_None,
EMappingKind_Button,
EMappingKind_Axis,
EMappingKind_Hat,
} EMappingKind;
typedef struct SDL_InputMapping
{
EMappingKind kind;
Uint8 target;
bool axis_reversed;
bool half_axis_positive;
bool half_axis_negative;
} SDL_InputMapping;
typedef struct SDL_GamepadMapping
{
SDL_InputMapping a;
SDL_InputMapping b;
SDL_InputMapping x;
SDL_InputMapping y;
SDL_InputMapping back;
SDL_InputMapping guide;
SDL_InputMapping start;
SDL_InputMapping leftstick;
SDL_InputMapping rightstick;
SDL_InputMapping leftshoulder;
SDL_InputMapping rightshoulder;
SDL_InputMapping dpup;
SDL_InputMapping dpdown;
SDL_InputMapping dpleft;
SDL_InputMapping dpright;
SDL_InputMapping misc1;
SDL_InputMapping misc2;
SDL_InputMapping misc3;
SDL_InputMapping misc4;
SDL_InputMapping misc5;
SDL_InputMapping misc6;
SDL_InputMapping right_paddle1;
SDL_InputMapping left_paddle1;
SDL_InputMapping right_paddle2;
SDL_InputMapping left_paddle2;
SDL_InputMapping leftx;
SDL_InputMapping lefty;
SDL_InputMapping rightx;
SDL_InputMapping righty;
SDL_InputMapping lefttrigger;
SDL_InputMapping righttrigger;
SDL_InputMapping touchpad;
} SDL_GamepadMapping;
extern bool SDL_PrivateJoystickGetAutoGamepadMapping(SDL_JoystickID instance_id,
SDL_GamepadMapping *out);
typedef struct
{
const char *included_hint_name;
int num_included_entries;
int max_included_entries;
Uint32 *included_entries;
const char *excluded_hint_name;
int num_excluded_entries;
int max_excluded_entries;
Uint32 *excluded_entries;
int num_initial_entries;
Uint32 *initial_entries;
bool initialized;
} SDL_vidpid_list;
extern void SDL_LoadVIDPIDList(SDL_vidpid_list *list);
extern void SDL_LoadVIDPIDListFromHints(SDL_vidpid_list *list, const char *included_list, const char *excluded_list);
extern bool SDL_VIDPIDInList(Uint16 vendor_id, Uint16 product_id, const SDL_vidpid_list *list);
extern void SDL_FreeVIDPIDList(SDL_vidpid_list *list);
#ifdef __cplusplus
}
#endif
#endif