28 #ifndef _SDL_gamecontroller_h
29 #define _SDL_gamecontroller_h
54 struct _SDL_GameController;
55 typedef struct _SDL_GameController SDL_GameController;
60 SDL_CONTROLLER_BINDTYPE_NONE = 0,
61 SDL_CONTROLLER_BINDTYPE_BUTTON,
62 SDL_CONTROLLER_BINDTYPE_AXIS,
63 SDL_CONTROLLER_BINDTYPE_HAT
64 } SDL_GameControllerBindType;
71 SDL_GameControllerBindType bindType;
196 SDL_CONTROLLER_AXIS_INVALID = -1,
197 SDL_CONTROLLER_AXIS_LEFTX,
198 SDL_CONTROLLER_AXIS_LEFTY,
199 SDL_CONTROLLER_AXIS_RIGHTX,
200 SDL_CONTROLLER_AXIS_RIGHTY,
201 SDL_CONTROLLER_AXIS_TRIGGERLEFT,
202 SDL_CONTROLLER_AXIS_TRIGGERRIGHT,
203 SDL_CONTROLLER_AXIS_MAX
230 extern DECLSPEC
Sint16 SDLCALL
239 SDL_CONTROLLER_BUTTON_INVALID = -1,
240 SDL_CONTROLLER_BUTTON_A,
241 SDL_CONTROLLER_BUTTON_B,
242 SDL_CONTROLLER_BUTTON_X,
243 SDL_CONTROLLER_BUTTON_Y,
244 SDL_CONTROLLER_BUTTON_BACK,
245 SDL_CONTROLLER_BUTTON_GUIDE,
246 SDL_CONTROLLER_BUTTON_START,
247 SDL_CONTROLLER_BUTTON_LEFTSTICK,
248 SDL_CONTROLLER_BUTTON_RIGHTSTICK,
249 SDL_CONTROLLER_BUTTON_LEFTSHOULDER,
250 SDL_CONTROLLER_BUTTON_RIGHTSHOULDER,
251 SDL_CONTROLLER_BUTTON_DPAD_UP,
252 SDL_CONTROLLER_BUTTON_DPAD_DOWN,
253 SDL_CONTROLLER_BUTTON_DPAD_LEFT,
254 SDL_CONTROLLER_BUTTON_DPAD_RIGHT,
255 SDL_CONTROLLER_BUTTON_MAX
uint8_t Uint8
An unsigned 8-bit integer type.
Definition: SDL_stdinc.h:129
DECLSPEC SDL_Joystick *SDLCALL SDL_GameControllerGetJoystick(SDL_GameController *gamecontroller)
struct SDL_GameControllerButtonBind SDL_GameControllerButtonBind
DECLSPEC Uint8 SDLCALL SDL_GameControllerGetButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button)
DECLSPEC const char *SDLCALL SDL_GameControllerGetStringForButton(SDL_GameControllerButton button)
SDL_GameControllerButton
Definition: SDL_gamecontroller.h:237
DECLSPEC int SDLCALL SDL_GameControllerAddMapping(const char *mappingString)
SDL_GameControllerAxis
Definition: SDL_gamecontroller.h:194
DECLSPEC char *SDLCALL SDL_GameControllerMappingForGUID(SDL_JoystickGUID guid)
DECLSPEC SDL_GameControllerButtonBind SDLCALL SDL_GameControllerGetBindForButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button)
DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *gamecontroller)
DECLSPEC SDL_bool SDLCALL SDL_GameControllerGetAttached(SDL_GameController *gamecontroller)
DECLSPEC SDL_GameControllerButton SDLCALL SDL_GameControllerGetButtonFromString(const char *pchString)
DECLSPEC int SDLCALL SDL_GameControllerEventState(int state)
DECLSPEC const char *SDLCALL SDL_GameControllerGetStringForAxis(SDL_GameControllerAxis axis)
Definition: SDL_joystick.h:68
DECLSPEC SDL_GameControllerButtonBind SDLCALL SDL_GameControllerGetBindForAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis)
DECLSPEC char *SDLCALL SDL_GameControllerMapping(SDL_GameController *gamecontroller)
DECLSPEC void SDLCALL SDL_GameControllerUpdate(void)
DECLSPEC void SDLCALL SDL_GameControllerClose(SDL_GameController *gamecontroller)
DECLSPEC SDL_GameControllerAxis SDLCALL SDL_GameControllerGetAxisFromString(const char *pchString)
DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_index)
DECLSPEC SDL_bool SDLCALL SDL_IsGameController(int joystick_index)
int16_t Sint16
A signed 16-bit integer type.
Definition: SDL_stdinc.h:133
DECLSPEC Sint16 SDLCALL SDL_GameControllerGetAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis)
DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerOpen(int joystick_index)