| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
SDL3.Sys.Bindgen.Gamepad
Description
SDL provides a low-level joystick API, which just treats joysticks as an arbitrary pile of buttons, axes, and hat switches. If you're planning to write your own control configuration screen, this can give you a lot of flexibility, but that's a lot of work, and most things that we consider "joysticks" now are actually console-style gamepads. So SDL provides the gamepad API on top of the lower-level joystick functionality.
The difference between a joystick and a gamepad is that a gamepad tells you where a button or axis is on the device. You don't speak to gamepads in terms of arbitrary numbers like "button 3" or "axis 2" but in standard locations: the d-pad, the shoulder buttons, triggers, A/B/X/Y (or X/O/Square/Triangle, if you will).
One turns a joystick into a gamepad by providing a magic configuration string, which tells SDL the details of a specific device: when you see this specific hardware, if button 2 gets pressed, this is actually D-Pad Up, etc.
SDL has many popular controllers configured out of the box, and users can add their own controller details through an environment variable if it's otherwise unknown to SDL.
In order to use these functions, SDL_Init() must have been called with the SDL_INIT_GAMEPAD flag. This causes SDL to scan the system for gamepads, and load appropriate drivers.
If you're using SDL gamepad support in a Steam game, you must call SteamAPI_InitEx() before calling SDL_Init().
If you would like to receive gamepad updates while the application is in the background, you should set the following hint before calling SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS
Gamepads support various optional features such as rumble, color LEDs, touchpad, gyro, etc. The support for these features varies depending on the controller and OS support available. You can check for LED and rumble capabilities at runtime by calling SDL_GetGamepadProperties() and checking the various capability properties. You can check for touchpad by calling SDL_GetNumGamepadTouchpads() and check for gyro and accelerometer by calling SDL_GamepadHasSensor().
By default SDL will try to use the most capable driver available, but you can tune which OS drivers to use with the various joystick hints in SDL_hints.h.
Your application should always support gamepad hotplugging. On some platforms like Xbox, Steam Deck, etc., this is a requirement for certification. On other platforms, like macOS and Windows when using Windows.Gaming.Input, controllers may not be available at startup and will come in at some point after you've started processing events. The structure used to identify an SDL gamepad
Since: 3.2.0
Synopsis
- data SDL_Gamepad
- newtype SDL_GamepadType = SDL_GamepadType {}
- pattern SDL_GAMEPAD_TYPE_UNKNOWN :: SDL_GamepadType
- pattern SDL_GAMEPAD_TYPE_STANDARD :: SDL_GamepadType
- pattern SDL_GAMEPAD_TYPE_XBOX360 :: SDL_GamepadType
- pattern SDL_GAMEPAD_TYPE_XBOXONE :: SDL_GamepadType
- pattern SDL_GAMEPAD_TYPE_PS3 :: SDL_GamepadType
- pattern SDL_GAMEPAD_TYPE_PS4 :: SDL_GamepadType
- pattern SDL_GAMEPAD_TYPE_PS5 :: SDL_GamepadType
- pattern SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_PRO :: SDL_GamepadType
- pattern SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_LEFT :: SDL_GamepadType
- pattern SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT :: SDL_GamepadType
- pattern SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_PAIR :: SDL_GamepadType
- pattern SDL_GAMEPAD_TYPE_GAMECUBE :: SDL_GamepadType
- pattern SDL_GAMEPAD_TYPE_STEAM :: SDL_GamepadType
- pattern SDL_GAMEPAD_TYPE_COUNT :: SDL_GamepadType
- newtype SDL_GamepadButton = SDL_GamepadButton {}
- pattern SDL_GAMEPAD_BUTTON_INVALID :: SDL_GamepadButton
- pattern SDL_GAMEPAD_BUTTON_SOUTH :: SDL_GamepadButton
- pattern SDL_GAMEPAD_BUTTON_EAST :: SDL_GamepadButton
- pattern SDL_GAMEPAD_BUTTON_WEST :: SDL_GamepadButton
- pattern SDL_GAMEPAD_BUTTON_NORTH :: SDL_GamepadButton
- pattern SDL_GAMEPAD_BUTTON_BACK :: SDL_GamepadButton
- pattern SDL_GAMEPAD_BUTTON_GUIDE :: SDL_GamepadButton
- pattern SDL_GAMEPAD_BUTTON_START :: SDL_GamepadButton
- pattern SDL_GAMEPAD_BUTTON_LEFT_STICK :: SDL_GamepadButton
- pattern SDL_GAMEPAD_BUTTON_RIGHT_STICK :: SDL_GamepadButton
- pattern SDL_GAMEPAD_BUTTON_LEFT_SHOULDER :: SDL_GamepadButton
- pattern SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER :: SDL_GamepadButton
- pattern SDL_GAMEPAD_BUTTON_DPAD_UP :: SDL_GamepadButton
- pattern SDL_GAMEPAD_BUTTON_DPAD_DOWN :: SDL_GamepadButton
- pattern SDL_GAMEPAD_BUTTON_DPAD_LEFT :: SDL_GamepadButton
- pattern SDL_GAMEPAD_BUTTON_DPAD_RIGHT :: SDL_GamepadButton
- pattern SDL_GAMEPAD_BUTTON_MISC1 :: SDL_GamepadButton
- pattern SDL_GAMEPAD_BUTTON_RIGHT_PADDLE1 :: SDL_GamepadButton
- pattern SDL_GAMEPAD_BUTTON_LEFT_PADDLE1 :: SDL_GamepadButton
- pattern SDL_GAMEPAD_BUTTON_RIGHT_PADDLE2 :: SDL_GamepadButton
- pattern SDL_GAMEPAD_BUTTON_LEFT_PADDLE2 :: SDL_GamepadButton
- pattern SDL_GAMEPAD_BUTTON_TOUCHPAD :: SDL_GamepadButton
- pattern SDL_GAMEPAD_BUTTON_MISC2 :: SDL_GamepadButton
- pattern SDL_GAMEPAD_BUTTON_MISC3 :: SDL_GamepadButton
- pattern SDL_GAMEPAD_BUTTON_MISC4 :: SDL_GamepadButton
- pattern SDL_GAMEPAD_BUTTON_MISC5 :: SDL_GamepadButton
- pattern SDL_GAMEPAD_BUTTON_MISC6 :: SDL_GamepadButton
- pattern SDL_GAMEPAD_BUTTON_COUNT :: SDL_GamepadButton
- newtype SDL_GamepadButtonLabel = SDL_GamepadButtonLabel {}
- pattern SDL_GAMEPAD_BUTTON_LABEL_UNKNOWN :: SDL_GamepadButtonLabel
- pattern SDL_GAMEPAD_BUTTON_LABEL_A :: SDL_GamepadButtonLabel
- pattern SDL_GAMEPAD_BUTTON_LABEL_B :: SDL_GamepadButtonLabel
- pattern SDL_GAMEPAD_BUTTON_LABEL_X :: SDL_GamepadButtonLabel
- pattern SDL_GAMEPAD_BUTTON_LABEL_Y :: SDL_GamepadButtonLabel
- pattern SDL_GAMEPAD_BUTTON_LABEL_CROSS :: SDL_GamepadButtonLabel
- pattern SDL_GAMEPAD_BUTTON_LABEL_CIRCLE :: SDL_GamepadButtonLabel
- pattern SDL_GAMEPAD_BUTTON_LABEL_SQUARE :: SDL_GamepadButtonLabel
- pattern SDL_GAMEPAD_BUTTON_LABEL_TRIANGLE :: SDL_GamepadButtonLabel
- newtype SDL_GamepadAxis = SDL_GamepadAxis {}
- pattern SDL_GAMEPAD_AXIS_INVALID :: SDL_GamepadAxis
- pattern SDL_GAMEPAD_AXIS_LEFTX :: SDL_GamepadAxis
- pattern SDL_GAMEPAD_AXIS_LEFTY :: SDL_GamepadAxis
- pattern SDL_GAMEPAD_AXIS_RIGHTX :: SDL_GamepadAxis
- pattern SDL_GAMEPAD_AXIS_RIGHTY :: SDL_GamepadAxis
- pattern SDL_GAMEPAD_AXIS_LEFT_TRIGGER :: SDL_GamepadAxis
- pattern SDL_GAMEPAD_AXIS_RIGHT_TRIGGER :: SDL_GamepadAxis
- pattern SDL_GAMEPAD_AXIS_COUNT :: SDL_GamepadAxis
- newtype SDL_GamepadBindingType = SDL_GamepadBindingType {}
- pattern SDL_GAMEPAD_BINDTYPE_NONE :: SDL_GamepadBindingType
- pattern SDL_GAMEPAD_BINDTYPE_BUTTON :: SDL_GamepadBindingType
- pattern SDL_GAMEPAD_BINDTYPE_AXIS :: SDL_GamepadBindingType
- pattern SDL_GAMEPAD_BINDTYPE_HAT :: SDL_GamepadBindingType
- data SDL_GamepadBinding_input_axis = SDL_GamepadBinding_input_axis {}
- data SDL_GamepadBinding_input_hat = SDL_GamepadBinding_input_hat {}
- newtype SDL_GamepadBinding_input = SDL_GamepadBinding_input {}
- data SDL_GamepadBinding_output_axis = SDL_GamepadBinding_output_axis {}
- newtype SDL_GamepadBinding_output = SDL_GamepadBinding_output {}
- data SDL_GamepadBinding = SDL_GamepadBinding {}
Documentation
data SDL_Gamepad Source #
- C declaration
struct SDL_Gamepad, defined atSDL3/SDL_gamepad.h 100:16
newtype SDL_GamepadType Source #
Standard gamepad types.
This type does not necessarily map to first-party controllers from Microsoft/Sony/Nintendo; in many cases, third-party controllers can report as these, either because they were designed for a specific console, or they simply most closely match that console's controllers (does it have A/B/X/Y buttons or X/O/Square/Triangle? Does it have a touchpad? etc).
- C declaration
enum SDL_GamepadType, defined atSDL3/SDL_gamepad.h 111:14
Constructors
| SDL_GamepadType | |
Instances
pattern SDL_GAMEPAD_TYPE_UNKNOWN :: SDL_GamepadType Source #
- C declaration
SDL_GAMEPAD_TYPE_UNKNOWN, defined atSDL3/SDL_gamepad.h 113:5
pattern SDL_GAMEPAD_TYPE_STANDARD :: SDL_GamepadType Source #
- C declaration
SDL_GAMEPAD_TYPE_STANDARD, defined atSDL3/SDL_gamepad.h 114:5
pattern SDL_GAMEPAD_TYPE_XBOX360 :: SDL_GamepadType Source #
- C declaration
SDL_GAMEPAD_TYPE_XBOX360, defined atSDL3/SDL_gamepad.h 115:5
pattern SDL_GAMEPAD_TYPE_XBOXONE :: SDL_GamepadType Source #
- C declaration
SDL_GAMEPAD_TYPE_XBOXONE, defined atSDL3/SDL_gamepad.h 116:5
pattern SDL_GAMEPAD_TYPE_PS3 :: SDL_GamepadType Source #
- C declaration
SDL_GAMEPAD_TYPE_PS3, defined atSDL3/SDL_gamepad.h 117:5
pattern SDL_GAMEPAD_TYPE_PS4 :: SDL_GamepadType Source #
- C declaration
SDL_GAMEPAD_TYPE_PS4, defined atSDL3/SDL_gamepad.h 118:5
pattern SDL_GAMEPAD_TYPE_PS5 :: SDL_GamepadType Source #
- C declaration
SDL_GAMEPAD_TYPE_PS5, defined atSDL3/SDL_gamepad.h 119:5
pattern SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_PRO :: SDL_GamepadType Source #
- C declaration
SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_PRO, defined atSDL3/SDL_gamepad.h 120:5
pattern SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_LEFT :: SDL_GamepadType Source #
- C declaration
SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_LEFT, defined atSDL3/SDL_gamepad.h 121:5
pattern SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT :: SDL_GamepadType Source #
- C declaration
SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT, defined atSDL3/SDL_gamepad.h 122:5
pattern SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_PAIR :: SDL_GamepadType Source #
- C declaration
SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_PAIR, defined atSDL3/SDL_gamepad.h 123:5
pattern SDL_GAMEPAD_TYPE_GAMECUBE :: SDL_GamepadType Source #
- C declaration
SDL_GAMEPAD_TYPE_GAMECUBE, defined atSDL3/SDL_gamepad.h 124:5
pattern SDL_GAMEPAD_TYPE_STEAM :: SDL_GamepadType Source #
- C declaration
SDL_GAMEPAD_TYPE_STEAM, defined atSDL3/SDL_gamepad.h 125:5
pattern SDL_GAMEPAD_TYPE_COUNT :: SDL_GamepadType Source #
- C declaration
SDL_GAMEPAD_TYPE_COUNT, defined atSDL3/SDL_gamepad.h 126:5
newtype SDL_GamepadButton Source #
The list of buttons available on a gamepad
For controllers that use a diamond pattern for the face buttons, the south/east/west/north buttons below correspond to the locations in the diamond pattern. For Xbox controllers, this would be A/B/X/Y, for Nintendo Switch controllers, this would be B/A/Y/X, for GameCube controllers this would be A/X/B/Y, for PlayStation controllers this would be Cross/Circle/Square/Triangle.
For controllers that don't use a diamond pattern for the face buttons, the south/east/west/north buttons indicate the buttons labeled A, B, C, D, or 1, 2, 3, 4, or for controllers that aren't labeled, they are the primary, secondary, etc. buttons.
The activate action is often the south button and the cancel action is often the east button, but in some regions this is reversed, so your game should allow remapping actions based on user preferences.
You can query the labels for the face buttons using SDL_GetGamepadButtonLabel()
- C declaration
enum SDL_GamepadButton, defined atSDL3/SDL_gamepad.h 153:14
Since: 3.2.0
Constructors
| SDL_GamepadButton | |
Instances
| Storable SDL_GamepadButton Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods sizeOf :: SDL_GamepadButton -> Int # alignment :: SDL_GamepadButton -> Int # peekElemOff :: Ptr SDL_GamepadButton -> Int -> IO SDL_GamepadButton # pokeElemOff :: Ptr SDL_GamepadButton -> Int -> SDL_GamepadButton -> IO () # peekByteOff :: Ptr b -> Int -> IO SDL_GamepadButton # pokeByteOff :: Ptr b -> Int -> SDL_GamepadButton -> IO () # peek :: Ptr SDL_GamepadButton -> IO SDL_GamepadButton # poke :: Ptr SDL_GamepadButton -> SDL_GamepadButton -> IO () # | |||||
| Generic SDL_GamepadButton Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
Methods from :: SDL_GamepadButton -> Rep SDL_GamepadButton x # to :: Rep SDL_GamepadButton x -> SDL_GamepadButton # | |||||
| Read SDL_GamepadButton Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods readsPrec :: Int -> ReadS SDL_GamepadButton # readList :: ReadS [SDL_GamepadButton] # | |||||
| Show SDL_GamepadButton Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods showsPrec :: Int -> SDL_GamepadButton -> ShowS # show :: SDL_GamepadButton -> String # showList :: [SDL_GamepadButton] -> ShowS # | |||||
| Eq SDL_GamepadButton Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods (==) :: SDL_GamepadButton -> SDL_GamepadButton -> Bool # (/=) :: SDL_GamepadButton -> SDL_GamepadButton -> Bool # | |||||
| Ord SDL_GamepadButton Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods compare :: SDL_GamepadButton -> SDL_GamepadButton -> Ordering # (<) :: SDL_GamepadButton -> SDL_GamepadButton -> Bool # (<=) :: SDL_GamepadButton -> SDL_GamepadButton -> Bool # (>) :: SDL_GamepadButton -> SDL_GamepadButton -> Bool # (>=) :: SDL_GamepadButton -> SDL_GamepadButton -> Bool # max :: SDL_GamepadButton -> SDL_GamepadButton -> SDL_GamepadButton # min :: SDL_GamepadButton -> SDL_GamepadButton -> SDL_GamepadButton # | |||||
| Prim SDL_GamepadButton Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods sizeOfType# :: Proxy SDL_GamepadButton -> Int# # sizeOf# :: SDL_GamepadButton -> Int# # alignmentOfType# :: Proxy SDL_GamepadButton -> Int# # alignment# :: SDL_GamepadButton -> Int# # indexByteArray# :: ByteArray# -> Int# -> SDL_GamepadButton # readByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, SDL_GamepadButton #) # writeByteArray# :: MutableByteArray# s -> Int# -> SDL_GamepadButton -> State# s -> State# s # setByteArray# :: MutableByteArray# s -> Int# -> Int# -> SDL_GamepadButton -> State# s -> State# s # indexOffAddr# :: Addr# -> Int# -> SDL_GamepadButton # readOffAddr# :: Addr# -> Int# -> State# s -> (# State# s, SDL_GamepadButton #) # writeOffAddr# :: Addr# -> Int# -> SDL_GamepadButton -> State# s -> State# s # setOffAddr# :: Addr# -> Int# -> Int# -> SDL_GamepadButton -> State# s -> State# s # | |||||
| CEnum SDL_GamepadButton Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
Methods toCEnum :: CEnumZ SDL_GamepadButton -> SDL_GamepadButton # fromCEnum :: SDL_GamepadButton -> CEnumZ SDL_GamepadButton # declaredValues :: proxy SDL_GamepadButton -> DeclaredValues SDL_GamepadButton # showsUndeclared :: proxy SDL_GamepadButton -> Int -> CEnumZ SDL_GamepadButton -> ShowS # readPrecUndeclared :: ReadPrec SDL_GamepadButton # isDeclared :: SDL_GamepadButton -> Bool # mkDeclared :: CEnumZ SDL_GamepadButton -> Maybe SDL_GamepadButton # | |||||
| SequentialCEnum SDL_GamepadButton Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||
| HasFFIType SDL_GamepadButton Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
Methods toFFIType :: SDL_GamepadButton -> FFIType SDL_GamepadButton # fromFFIType :: FFIType SDL_GamepadButton -> SDL_GamepadButton # | |||||
| ReadRaw SDL_GamepadButton Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods | |||||
| StaticSize SDL_GamepadButton Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods staticSizeOf :: Proxy SDL_GamepadButton -> Int # | |||||
| WriteRaw SDL_GamepadButton Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods writeRaw :: Ptr SDL_GamepadButton -> SDL_GamepadButton -> IO () # | |||||
| HasCField SDL_GamepadButton "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
| |||||
| ty ~ CInt => HasField "unwrap" SDL_GamepadButton ty Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods hasField :: SDL_GamepadButton -> (ty -> SDL_GamepadButton, ty) # | |||||
| ty ~ CInt => HasField "unwrap" (Ptr SDL_GamepadButton) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods getField :: Ptr SDL_GamepadButton -> Ptr ty # | |||||
| type Rep SDL_GamepadButton Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad type Rep SDL_GamepadButton = D1 ('MetaData "SDL_GamepadButton" "SDL3.Sys.Bindgen.Gamepad" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_GamepadButton" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CInt))) | |||||
| type CEnumZ SDL_GamepadButton Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||
| type FFIType SDL_GamepadButton Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||
| type CFieldType SDL_GamepadButton "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||
pattern SDL_GAMEPAD_BUTTON_INVALID :: SDL_GamepadButton Source #
- C declaration
SDL_GAMEPAD_BUTTON_INVALID, defined atSDL3/SDL_gamepad.h 155:5
pattern SDL_GAMEPAD_BUTTON_SOUTH :: SDL_GamepadButton Source #
Bottom face button (e.g. Xbox A button)
- C declaration
SDL_GAMEPAD_BUTTON_SOUTH, defined atSDL3/SDL_gamepad.h 156:5
pattern SDL_GAMEPAD_BUTTON_EAST :: SDL_GamepadButton Source #
Right face button (e.g. Xbox B button)
- C declaration
SDL_GAMEPAD_BUTTON_EAST, defined atSDL3/SDL_gamepad.h 157:5
pattern SDL_GAMEPAD_BUTTON_WEST :: SDL_GamepadButton Source #
Left face button (e.g. Xbox X button)
- C declaration
SDL_GAMEPAD_BUTTON_WEST, defined atSDL3/SDL_gamepad.h 158:5
pattern SDL_GAMEPAD_BUTTON_NORTH :: SDL_GamepadButton Source #
Top face button (e.g. Xbox Y button)
- C declaration
SDL_GAMEPAD_BUTTON_NORTH, defined atSDL3/SDL_gamepad.h 159:5
pattern SDL_GAMEPAD_BUTTON_BACK :: SDL_GamepadButton Source #
- C declaration
SDL_GAMEPAD_BUTTON_BACK, defined atSDL3/SDL_gamepad.h 160:5
pattern SDL_GAMEPAD_BUTTON_GUIDE :: SDL_GamepadButton Source #
- C declaration
SDL_GAMEPAD_BUTTON_GUIDE, defined atSDL3/SDL_gamepad.h 161:5
pattern SDL_GAMEPAD_BUTTON_START :: SDL_GamepadButton Source #
- C declaration
SDL_GAMEPAD_BUTTON_START, defined atSDL3/SDL_gamepad.h 162:5
pattern SDL_GAMEPAD_BUTTON_LEFT_STICK :: SDL_GamepadButton Source #
- C declaration
SDL_GAMEPAD_BUTTON_LEFT_STICK, defined atSDL3/SDL_gamepad.h 163:5
pattern SDL_GAMEPAD_BUTTON_RIGHT_STICK :: SDL_GamepadButton Source #
- C declaration
SDL_GAMEPAD_BUTTON_RIGHT_STICK, defined atSDL3/SDL_gamepad.h 164:5
pattern SDL_GAMEPAD_BUTTON_LEFT_SHOULDER :: SDL_GamepadButton Source #
- C declaration
SDL_GAMEPAD_BUTTON_LEFT_SHOULDER, defined atSDL3/SDL_gamepad.h 165:5
pattern SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER :: SDL_GamepadButton Source #
- C declaration
SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER, defined atSDL3/SDL_gamepad.h 166:5
pattern SDL_GAMEPAD_BUTTON_DPAD_UP :: SDL_GamepadButton Source #
- C declaration
SDL_GAMEPAD_BUTTON_DPAD_UP, defined atSDL3/SDL_gamepad.h 167:5
pattern SDL_GAMEPAD_BUTTON_DPAD_DOWN :: SDL_GamepadButton Source #
- C declaration
SDL_GAMEPAD_BUTTON_DPAD_DOWN, defined atSDL3/SDL_gamepad.h 168:5
pattern SDL_GAMEPAD_BUTTON_DPAD_LEFT :: SDL_GamepadButton Source #
- C declaration
SDL_GAMEPAD_BUTTON_DPAD_LEFT, defined atSDL3/SDL_gamepad.h 169:5
pattern SDL_GAMEPAD_BUTTON_DPAD_RIGHT :: SDL_GamepadButton Source #
- C declaration
SDL_GAMEPAD_BUTTON_DPAD_RIGHT, defined atSDL3/SDL_gamepad.h 170:5
pattern SDL_GAMEPAD_BUTTON_MISC1 :: SDL_GamepadButton Source #
Additional button (e.g. Xbox Series X share button, PS5 microphone button, Nintendo Switch Pro capture button, Steam Controller QAM button, Amazon Luna microphone button, Google Stadia capture button)
- C declaration
SDL_GAMEPAD_BUTTON_MISC1, defined atSDL3/SDL_gamepad.h 171:5
pattern SDL_GAMEPAD_BUTTON_RIGHT_PADDLE1 :: SDL_GamepadButton Source #
Upper or primary paddle, under your right hand (e.g. Xbox Elite paddle P1, DualSense Edge RB button, Right Joy-Con SR button, Steam Controller R4 button)
- C declaration
SDL_GAMEPAD_BUTTON_RIGHT_PADDLE1, defined atSDL3/SDL_gamepad.h 172:5
pattern SDL_GAMEPAD_BUTTON_LEFT_PADDLE1 :: SDL_GamepadButton Source #
Upper or primary paddle, under your left hand (e.g. Xbox Elite paddle P3, DualSense Edge LB button, Left Joy-Con SL button, Steam Controller L4 button)
- C declaration
SDL_GAMEPAD_BUTTON_LEFT_PADDLE1, defined atSDL3/SDL_gamepad.h 173:5
pattern SDL_GAMEPAD_BUTTON_RIGHT_PADDLE2 :: SDL_GamepadButton Source #
Lower or secondary paddle, under your right hand (e.g. Xbox Elite paddle P2, DualSense Edge right Fn button, Right Joy-Con SL button, Steam Controller R5 button)
- C declaration
SDL_GAMEPAD_BUTTON_RIGHT_PADDLE2, defined atSDL3/SDL_gamepad.h 174:5
pattern SDL_GAMEPAD_BUTTON_LEFT_PADDLE2 :: SDL_GamepadButton Source #
Lower or secondary paddle, under your left hand (e.g. Xbox Elite paddle P4, DualSense Edge left Fn button, Left Joy-Con SR button, Steam Controller L5 button)
- C declaration
SDL_GAMEPAD_BUTTON_LEFT_PADDLE2, defined atSDL3/SDL_gamepad.h 175:5
pattern SDL_GAMEPAD_BUTTON_TOUCHPAD :: SDL_GamepadButton Source #
PS4/PS5 touchpad button
- C declaration
SDL_GAMEPAD_BUTTON_TOUCHPAD, defined atSDL3/SDL_gamepad.h 176:5
pattern SDL_GAMEPAD_BUTTON_MISC2 :: SDL_GamepadButton Source #
Additional button
- C declaration
SDL_GAMEPAD_BUTTON_MISC2, defined atSDL3/SDL_gamepad.h 177:5
pattern SDL_GAMEPAD_BUTTON_MISC3 :: SDL_GamepadButton Source #
Additional button (e.g. Nintendo GameCube left trigger click)
- C declaration
SDL_GAMEPAD_BUTTON_MISC3, defined atSDL3/SDL_gamepad.h 178:5
pattern SDL_GAMEPAD_BUTTON_MISC4 :: SDL_GamepadButton Source #
Additional button (e.g. Nintendo GameCube right trigger click)
- C declaration
SDL_GAMEPAD_BUTTON_MISC4, defined atSDL3/SDL_gamepad.h 179:5
pattern SDL_GAMEPAD_BUTTON_MISC5 :: SDL_GamepadButton Source #
Additional button
- C declaration
SDL_GAMEPAD_BUTTON_MISC5, defined atSDL3/SDL_gamepad.h 180:5
pattern SDL_GAMEPAD_BUTTON_MISC6 :: SDL_GamepadButton Source #
Additional button
- C declaration
SDL_GAMEPAD_BUTTON_MISC6, defined atSDL3/SDL_gamepad.h 181:5
pattern SDL_GAMEPAD_BUTTON_COUNT :: SDL_GamepadButton Source #
- C declaration
SDL_GAMEPAD_BUTTON_COUNT, defined atSDL3/SDL_gamepad.h 182:5
newtype SDL_GamepadButtonLabel Source #
The set of gamepad button labels
This isn't a complete set, just the face buttons to make it easy to show button prompts.
For a complete set, you should look at the button and gamepad type and have a set of symbols that work well with your art style.
- C declaration
enum SDL_GamepadButtonLabel, defined atSDL3/SDL_gamepad.h 196:14
Since: 3.2.0
Constructors
| SDL_GamepadButtonLabel | |
Instances
| Storable SDL_GamepadButtonLabel Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods sizeOf :: SDL_GamepadButtonLabel -> Int # alignment :: SDL_GamepadButtonLabel -> Int # peekElemOff :: Ptr SDL_GamepadButtonLabel -> Int -> IO SDL_GamepadButtonLabel # pokeElemOff :: Ptr SDL_GamepadButtonLabel -> Int -> SDL_GamepadButtonLabel -> IO () # peekByteOff :: Ptr b -> Int -> IO SDL_GamepadButtonLabel # pokeByteOff :: Ptr b -> Int -> SDL_GamepadButtonLabel -> IO () # peek :: Ptr SDL_GamepadButtonLabel -> IO SDL_GamepadButtonLabel # poke :: Ptr SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel -> IO () # | |||||
| Generic SDL_GamepadButtonLabel Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
Methods from :: SDL_GamepadButtonLabel -> Rep SDL_GamepadButtonLabel x # to :: Rep SDL_GamepadButtonLabel x -> SDL_GamepadButtonLabel # | |||||
| Read SDL_GamepadButtonLabel Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||
| Show SDL_GamepadButtonLabel Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods showsPrec :: Int -> SDL_GamepadButtonLabel -> ShowS # show :: SDL_GamepadButtonLabel -> String # showList :: [SDL_GamepadButtonLabel] -> ShowS # | |||||
| Eq SDL_GamepadButtonLabel Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods (==) :: SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel -> Bool # (/=) :: SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel -> Bool # | |||||
| Ord SDL_GamepadButtonLabel Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods compare :: SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel -> Ordering # (<) :: SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel -> Bool # (<=) :: SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel -> Bool # (>) :: SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel -> Bool # (>=) :: SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel -> Bool # max :: SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel # min :: SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel # | |||||
| Prim SDL_GamepadButtonLabel Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods sizeOfType# :: Proxy SDL_GamepadButtonLabel -> Int# # sizeOf# :: SDL_GamepadButtonLabel -> Int# # alignmentOfType# :: Proxy SDL_GamepadButtonLabel -> Int# # alignment# :: SDL_GamepadButtonLabel -> Int# # indexByteArray# :: ByteArray# -> Int# -> SDL_GamepadButtonLabel # readByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, SDL_GamepadButtonLabel #) # writeByteArray# :: MutableByteArray# s -> Int# -> SDL_GamepadButtonLabel -> State# s -> State# s # setByteArray# :: MutableByteArray# s -> Int# -> Int# -> SDL_GamepadButtonLabel -> State# s -> State# s # indexOffAddr# :: Addr# -> Int# -> SDL_GamepadButtonLabel # readOffAddr# :: Addr# -> Int# -> State# s -> (# State# s, SDL_GamepadButtonLabel #) # writeOffAddr# :: Addr# -> Int# -> SDL_GamepadButtonLabel -> State# s -> State# s # setOffAddr# :: Addr# -> Int# -> Int# -> SDL_GamepadButtonLabel -> State# s -> State# s # | |||||
| CEnum SDL_GamepadButtonLabel Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
Methods toCEnum :: CEnumZ SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel # fromCEnum :: SDL_GamepadButtonLabel -> CEnumZ SDL_GamepadButtonLabel # declaredValues :: proxy SDL_GamepadButtonLabel -> DeclaredValues SDL_GamepadButtonLabel # showsUndeclared :: proxy SDL_GamepadButtonLabel -> Int -> CEnumZ SDL_GamepadButtonLabel -> ShowS # readPrecUndeclared :: ReadPrec SDL_GamepadButtonLabel # isDeclared :: SDL_GamepadButtonLabel -> Bool # mkDeclared :: CEnumZ SDL_GamepadButtonLabel -> Maybe SDL_GamepadButtonLabel # | |||||
| SequentialCEnum SDL_GamepadButtonLabel Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||
| HasFFIType SDL_GamepadButtonLabel Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
| |||||
| ReadRaw SDL_GamepadButtonLabel Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods readRaw :: Ptr SDL_GamepadButtonLabel -> IO SDL_GamepadButtonLabel # | |||||
| StaticSize SDL_GamepadButtonLabel Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods | |||||
| WriteRaw SDL_GamepadButtonLabel Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods writeRaw :: Ptr SDL_GamepadButtonLabel -> SDL_GamepadButtonLabel -> IO () # | |||||
| HasCField SDL_GamepadButtonLabel "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
| |||||
| ty ~ CUInt => HasField "unwrap" SDL_GamepadButtonLabel ty Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods hasField :: SDL_GamepadButtonLabel -> (ty -> SDL_GamepadButtonLabel, ty) # | |||||
| ty ~ CUInt => HasField "unwrap" (Ptr SDL_GamepadButtonLabel) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods getField :: Ptr SDL_GamepadButtonLabel -> Ptr ty # | |||||
| type Rep SDL_GamepadButtonLabel Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad type Rep SDL_GamepadButtonLabel = D1 ('MetaData "SDL_GamepadButtonLabel" "SDL3.Sys.Bindgen.Gamepad" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_GamepadButtonLabel" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CUInt))) | |||||
| type CEnumZ SDL_GamepadButtonLabel Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||
| type FFIType SDL_GamepadButtonLabel Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||
| type CFieldType SDL_GamepadButtonLabel "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||
pattern SDL_GAMEPAD_BUTTON_LABEL_UNKNOWN :: SDL_GamepadButtonLabel Source #
- C declaration
SDL_GAMEPAD_BUTTON_LABEL_UNKNOWN, defined atSDL3/SDL_gamepad.h 198:5
pattern SDL_GAMEPAD_BUTTON_LABEL_A :: SDL_GamepadButtonLabel Source #
- C declaration
SDL_GAMEPAD_BUTTON_LABEL_A, defined atSDL3/SDL_gamepad.h 199:5
pattern SDL_GAMEPAD_BUTTON_LABEL_B :: SDL_GamepadButtonLabel Source #
- C declaration
SDL_GAMEPAD_BUTTON_LABEL_B, defined atSDL3/SDL_gamepad.h 200:5
pattern SDL_GAMEPAD_BUTTON_LABEL_X :: SDL_GamepadButtonLabel Source #
- C declaration
SDL_GAMEPAD_BUTTON_LABEL_X, defined atSDL3/SDL_gamepad.h 201:5
pattern SDL_GAMEPAD_BUTTON_LABEL_Y :: SDL_GamepadButtonLabel Source #
- C declaration
SDL_GAMEPAD_BUTTON_LABEL_Y, defined atSDL3/SDL_gamepad.h 202:5
pattern SDL_GAMEPAD_BUTTON_LABEL_CROSS :: SDL_GamepadButtonLabel Source #
- C declaration
SDL_GAMEPAD_BUTTON_LABEL_CROSS, defined atSDL3/SDL_gamepad.h 203:5
pattern SDL_GAMEPAD_BUTTON_LABEL_CIRCLE :: SDL_GamepadButtonLabel Source #
- C declaration
SDL_GAMEPAD_BUTTON_LABEL_CIRCLE, defined atSDL3/SDL_gamepad.h 204:5
pattern SDL_GAMEPAD_BUTTON_LABEL_SQUARE :: SDL_GamepadButtonLabel Source #
- C declaration
SDL_GAMEPAD_BUTTON_LABEL_SQUARE, defined atSDL3/SDL_gamepad.h 205:5
pattern SDL_GAMEPAD_BUTTON_LABEL_TRIANGLE :: SDL_GamepadButtonLabel Source #
- C declaration
SDL_GAMEPAD_BUTTON_LABEL_TRIANGLE, defined atSDL3/SDL_gamepad.h 206:5
newtype SDL_GamepadAxis Source #
The list of axes available on a gamepad
Thumbstick axis values range from SDL_JOYSTICK_AXIS_MIN to SDL_JOYSTICK_AXIS_MAX, and are centered within ~8000 of zero, though advanced UI will allow users to set or autodetect the dead zone, which varies between gamepads.
Trigger axis values range from 0 (released) to SDL_JOYSTICK_AXIS_MAX (fully pressed) when reported by SDL_GetGamepadAxis(). Note that this is not the same range that will be reported by the lower-level SDL_GetJoystickAxis().
- C declaration
enum SDL_GamepadAxis, defined atSDL3/SDL_gamepad.h 223:14
Since: 3.2.0
Constructors
| SDL_GamepadAxis | |
Instances
| Storable SDL_GamepadAxis Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods sizeOf :: SDL_GamepadAxis -> Int # alignment :: SDL_GamepadAxis -> Int # peekElemOff :: Ptr SDL_GamepadAxis -> Int -> IO SDL_GamepadAxis # pokeElemOff :: Ptr SDL_GamepadAxis -> Int -> SDL_GamepadAxis -> IO () # peekByteOff :: Ptr b -> Int -> IO SDL_GamepadAxis # pokeByteOff :: Ptr b -> Int -> SDL_GamepadAxis -> IO () # peek :: Ptr SDL_GamepadAxis -> IO SDL_GamepadAxis # poke :: Ptr SDL_GamepadAxis -> SDL_GamepadAxis -> IO () # | |||||
| Generic SDL_GamepadAxis Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
Methods from :: SDL_GamepadAxis -> Rep SDL_GamepadAxis x # to :: Rep SDL_GamepadAxis x -> SDL_GamepadAxis # | |||||
| Read SDL_GamepadAxis Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods readsPrec :: Int -> ReadS SDL_GamepadAxis # readList :: ReadS [SDL_GamepadAxis] # | |||||
| Show SDL_GamepadAxis Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods showsPrec :: Int -> SDL_GamepadAxis -> ShowS # show :: SDL_GamepadAxis -> String # showList :: [SDL_GamepadAxis] -> ShowS # | |||||
| Eq SDL_GamepadAxis Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods (==) :: SDL_GamepadAxis -> SDL_GamepadAxis -> Bool # (/=) :: SDL_GamepadAxis -> SDL_GamepadAxis -> Bool # | |||||
| Ord SDL_GamepadAxis Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods compare :: SDL_GamepadAxis -> SDL_GamepadAxis -> Ordering # (<) :: SDL_GamepadAxis -> SDL_GamepadAxis -> Bool # (<=) :: SDL_GamepadAxis -> SDL_GamepadAxis -> Bool # (>) :: SDL_GamepadAxis -> SDL_GamepadAxis -> Bool # (>=) :: SDL_GamepadAxis -> SDL_GamepadAxis -> Bool # max :: SDL_GamepadAxis -> SDL_GamepadAxis -> SDL_GamepadAxis # min :: SDL_GamepadAxis -> SDL_GamepadAxis -> SDL_GamepadAxis # | |||||
| Prim SDL_GamepadAxis Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods sizeOfType# :: Proxy SDL_GamepadAxis -> Int# # sizeOf# :: SDL_GamepadAxis -> Int# # alignmentOfType# :: Proxy SDL_GamepadAxis -> Int# # alignment# :: SDL_GamepadAxis -> Int# # indexByteArray# :: ByteArray# -> Int# -> SDL_GamepadAxis # readByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, SDL_GamepadAxis #) # writeByteArray# :: MutableByteArray# s -> Int# -> SDL_GamepadAxis -> State# s -> State# s # setByteArray# :: MutableByteArray# s -> Int# -> Int# -> SDL_GamepadAxis -> State# s -> State# s # indexOffAddr# :: Addr# -> Int# -> SDL_GamepadAxis # readOffAddr# :: Addr# -> Int# -> State# s -> (# State# s, SDL_GamepadAxis #) # writeOffAddr# :: Addr# -> Int# -> SDL_GamepadAxis -> State# s -> State# s # setOffAddr# :: Addr# -> Int# -> Int# -> SDL_GamepadAxis -> State# s -> State# s # | |||||
| CEnum SDL_GamepadAxis Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
Methods toCEnum :: CEnumZ SDL_GamepadAxis -> SDL_GamepadAxis # fromCEnum :: SDL_GamepadAxis -> CEnumZ SDL_GamepadAxis # declaredValues :: proxy SDL_GamepadAxis -> DeclaredValues SDL_GamepadAxis # showsUndeclared :: proxy SDL_GamepadAxis -> Int -> CEnumZ SDL_GamepadAxis -> ShowS # readPrecUndeclared :: ReadPrec SDL_GamepadAxis # isDeclared :: SDL_GamepadAxis -> Bool # mkDeclared :: CEnumZ SDL_GamepadAxis -> Maybe SDL_GamepadAxis # | |||||
| SequentialCEnum SDL_GamepadAxis Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||
| HasFFIType SDL_GamepadAxis Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
Methods | |||||
| ReadRaw SDL_GamepadAxis Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods readRaw :: Ptr SDL_GamepadAxis -> IO SDL_GamepadAxis # | |||||
| StaticSize SDL_GamepadAxis Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods staticSizeOf :: Proxy SDL_GamepadAxis -> Int # staticAlignment :: Proxy SDL_GamepadAxis -> Int # | |||||
| WriteRaw SDL_GamepadAxis Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods writeRaw :: Ptr SDL_GamepadAxis -> SDL_GamepadAxis -> IO () # | |||||
| HasCField SDL_GamepadAxis "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
| |||||
| ty ~ CInt => HasField "unwrap" SDL_GamepadAxis ty Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods hasField :: SDL_GamepadAxis -> (ty -> SDL_GamepadAxis, ty) # | |||||
| ty ~ CInt => HasField "unwrap" (Ptr SDL_GamepadAxis) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods getField :: Ptr SDL_GamepadAxis -> Ptr ty # | |||||
| type Rep SDL_GamepadAxis Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad type Rep SDL_GamepadAxis = D1 ('MetaData "SDL_GamepadAxis" "SDL3.Sys.Bindgen.Gamepad" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_GamepadAxis" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CInt))) | |||||
| type CEnumZ SDL_GamepadAxis Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||
| type FFIType SDL_GamepadAxis Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||
| type CFieldType SDL_GamepadAxis "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||
pattern SDL_GAMEPAD_AXIS_INVALID :: SDL_GamepadAxis Source #
- C declaration
SDL_GAMEPAD_AXIS_INVALID, defined atSDL3/SDL_gamepad.h 225:5
pattern SDL_GAMEPAD_AXIS_LEFTX :: SDL_GamepadAxis Source #
- C declaration
SDL_GAMEPAD_AXIS_LEFTX, defined atSDL3/SDL_gamepad.h 226:5
pattern SDL_GAMEPAD_AXIS_LEFTY :: SDL_GamepadAxis Source #
- C declaration
SDL_GAMEPAD_AXIS_LEFTY, defined atSDL3/SDL_gamepad.h 227:5
pattern SDL_GAMEPAD_AXIS_RIGHTX :: SDL_GamepadAxis Source #
- C declaration
SDL_GAMEPAD_AXIS_RIGHTX, defined atSDL3/SDL_gamepad.h 228:5
pattern SDL_GAMEPAD_AXIS_RIGHTY :: SDL_GamepadAxis Source #
- C declaration
SDL_GAMEPAD_AXIS_RIGHTY, defined atSDL3/SDL_gamepad.h 229:5
pattern SDL_GAMEPAD_AXIS_LEFT_TRIGGER :: SDL_GamepadAxis Source #
- C declaration
SDL_GAMEPAD_AXIS_LEFT_TRIGGER, defined atSDL3/SDL_gamepad.h 230:5
pattern SDL_GAMEPAD_AXIS_RIGHT_TRIGGER :: SDL_GamepadAxis Source #
- C declaration
SDL_GAMEPAD_AXIS_RIGHT_TRIGGER, defined atSDL3/SDL_gamepad.h 231:5
pattern SDL_GAMEPAD_AXIS_COUNT :: SDL_GamepadAxis Source #
- C declaration
SDL_GAMEPAD_AXIS_COUNT, defined atSDL3/SDL_gamepad.h 232:5
newtype SDL_GamepadBindingType Source #
Types of gamepad control bindings.
A gamepad is a collection of bindings that map arbitrary joystick buttons, axes and hat switches to specific positions on a generic console-style gamepad. This enum is used as part of SDL_GamepadBinding to specify those mappings.
- C declaration
enum SDL_GamepadBindingType, defined atSDL3/SDL_gamepad.h 245:14
Since: 3.2.0
Constructors
| SDL_GamepadBindingType | |
Instances
| Storable SDL_GamepadBindingType Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods sizeOf :: SDL_GamepadBindingType -> Int # alignment :: SDL_GamepadBindingType -> Int # peekElemOff :: Ptr SDL_GamepadBindingType -> Int -> IO SDL_GamepadBindingType # pokeElemOff :: Ptr SDL_GamepadBindingType -> Int -> SDL_GamepadBindingType -> IO () # peekByteOff :: Ptr b -> Int -> IO SDL_GamepadBindingType # pokeByteOff :: Ptr b -> Int -> SDL_GamepadBindingType -> IO () # peek :: Ptr SDL_GamepadBindingType -> IO SDL_GamepadBindingType # poke :: Ptr SDL_GamepadBindingType -> SDL_GamepadBindingType -> IO () # | |||||
| Generic SDL_GamepadBindingType Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
Methods from :: SDL_GamepadBindingType -> Rep SDL_GamepadBindingType x # to :: Rep SDL_GamepadBindingType x -> SDL_GamepadBindingType # | |||||
| Read SDL_GamepadBindingType Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||
| Show SDL_GamepadBindingType Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods showsPrec :: Int -> SDL_GamepadBindingType -> ShowS # show :: SDL_GamepadBindingType -> String # showList :: [SDL_GamepadBindingType] -> ShowS # | |||||
| Eq SDL_GamepadBindingType Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods (==) :: SDL_GamepadBindingType -> SDL_GamepadBindingType -> Bool # (/=) :: SDL_GamepadBindingType -> SDL_GamepadBindingType -> Bool # | |||||
| Ord SDL_GamepadBindingType Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods compare :: SDL_GamepadBindingType -> SDL_GamepadBindingType -> Ordering # (<) :: SDL_GamepadBindingType -> SDL_GamepadBindingType -> Bool # (<=) :: SDL_GamepadBindingType -> SDL_GamepadBindingType -> Bool # (>) :: SDL_GamepadBindingType -> SDL_GamepadBindingType -> Bool # (>=) :: SDL_GamepadBindingType -> SDL_GamepadBindingType -> Bool # max :: SDL_GamepadBindingType -> SDL_GamepadBindingType -> SDL_GamepadBindingType # min :: SDL_GamepadBindingType -> SDL_GamepadBindingType -> SDL_GamepadBindingType # | |||||
| Prim SDL_GamepadBindingType Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods sizeOfType# :: Proxy SDL_GamepadBindingType -> Int# # sizeOf# :: SDL_GamepadBindingType -> Int# # alignmentOfType# :: Proxy SDL_GamepadBindingType -> Int# # alignment# :: SDL_GamepadBindingType -> Int# # indexByteArray# :: ByteArray# -> Int# -> SDL_GamepadBindingType # readByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, SDL_GamepadBindingType #) # writeByteArray# :: MutableByteArray# s -> Int# -> SDL_GamepadBindingType -> State# s -> State# s # setByteArray# :: MutableByteArray# s -> Int# -> Int# -> SDL_GamepadBindingType -> State# s -> State# s # indexOffAddr# :: Addr# -> Int# -> SDL_GamepadBindingType # readOffAddr# :: Addr# -> Int# -> State# s -> (# State# s, SDL_GamepadBindingType #) # writeOffAddr# :: Addr# -> Int# -> SDL_GamepadBindingType -> State# s -> State# s # setOffAddr# :: Addr# -> Int# -> Int# -> SDL_GamepadBindingType -> State# s -> State# s # | |||||
| CEnum SDL_GamepadBindingType Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
Methods toCEnum :: CEnumZ SDL_GamepadBindingType -> SDL_GamepadBindingType # fromCEnum :: SDL_GamepadBindingType -> CEnumZ SDL_GamepadBindingType # declaredValues :: proxy SDL_GamepadBindingType -> DeclaredValues SDL_GamepadBindingType # showsUndeclared :: proxy SDL_GamepadBindingType -> Int -> CEnumZ SDL_GamepadBindingType -> ShowS # readPrecUndeclared :: ReadPrec SDL_GamepadBindingType # isDeclared :: SDL_GamepadBindingType -> Bool # mkDeclared :: CEnumZ SDL_GamepadBindingType -> Maybe SDL_GamepadBindingType # | |||||
| SequentialCEnum SDL_GamepadBindingType Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||
| HasFFIType SDL_GamepadBindingType Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
| |||||
| ReadRaw SDL_GamepadBindingType Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods readRaw :: Ptr SDL_GamepadBindingType -> IO SDL_GamepadBindingType # | |||||
| StaticSize SDL_GamepadBindingType Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods | |||||
| WriteRaw SDL_GamepadBindingType Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods writeRaw :: Ptr SDL_GamepadBindingType -> SDL_GamepadBindingType -> IO () # | |||||
| HasCField SDL_GamepadBindingType "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
| |||||
| ty ~ CUInt => HasField "unwrap" SDL_GamepadBindingType ty Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods hasField :: SDL_GamepadBindingType -> (ty -> SDL_GamepadBindingType, ty) # | |||||
| ty ~ CUInt => HasField "unwrap" (Ptr SDL_GamepadBindingType) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods getField :: Ptr SDL_GamepadBindingType -> Ptr ty # | |||||
| type Rep SDL_GamepadBindingType Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad type Rep SDL_GamepadBindingType = D1 ('MetaData "SDL_GamepadBindingType" "SDL3.Sys.Bindgen.Gamepad" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_GamepadBindingType" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CUInt))) | |||||
| type CEnumZ SDL_GamepadBindingType Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||
| type FFIType SDL_GamepadBindingType Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||
| type CFieldType SDL_GamepadBindingType "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||
pattern SDL_GAMEPAD_BINDTYPE_NONE :: SDL_GamepadBindingType Source #
- C declaration
SDL_GAMEPAD_BINDTYPE_NONE, defined atSDL3/SDL_gamepad.h 247:5
pattern SDL_GAMEPAD_BINDTYPE_BUTTON :: SDL_GamepadBindingType Source #
- C declaration
SDL_GAMEPAD_BINDTYPE_BUTTON, defined atSDL3/SDL_gamepad.h 248:5
pattern SDL_GAMEPAD_BINDTYPE_AXIS :: SDL_GamepadBindingType Source #
- C declaration
SDL_GAMEPAD_BINDTYPE_AXIS, defined atSDL3/SDL_gamepad.h 249:5
pattern SDL_GAMEPAD_BINDTYPE_HAT :: SDL_GamepadBindingType Source #
- C declaration
SDL_GAMEPAD_BINDTYPE_HAT, defined atSDL3/SDL_gamepad.h 250:5
data SDL_GamepadBinding_input_axis Source #
- C declaration
struct @SDL_GamepadBinding_input_axis, defined atSDL3/SDL_gamepad.h 275:9
Constructors
| SDL_GamepadBinding_input_axis | |
Instances
| Storable SDL_GamepadBinding_input_axis Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods sizeOf :: SDL_GamepadBinding_input_axis -> Int # alignment :: SDL_GamepadBinding_input_axis -> Int # peekElemOff :: Ptr SDL_GamepadBinding_input_axis -> Int -> IO SDL_GamepadBinding_input_axis # pokeElemOff :: Ptr SDL_GamepadBinding_input_axis -> Int -> SDL_GamepadBinding_input_axis -> IO () # peekByteOff :: Ptr b -> Int -> IO SDL_GamepadBinding_input_axis # pokeByteOff :: Ptr b -> Int -> SDL_GamepadBinding_input_axis -> IO () # peek :: Ptr SDL_GamepadBinding_input_axis -> IO SDL_GamepadBinding_input_axis # poke :: Ptr SDL_GamepadBinding_input_axis -> SDL_GamepadBinding_input_axis -> IO () # | |||||
| Generic SDL_GamepadBinding_input_axis Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
| |||||
| Show SDL_GamepadBinding_input_axis Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods showsPrec :: Int -> SDL_GamepadBinding_input_axis -> ShowS # show :: SDL_GamepadBinding_input_axis -> String # showList :: [SDL_GamepadBinding_input_axis] -> ShowS # | |||||
| Eq SDL_GamepadBinding_input_axis Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||
| ReadRaw SDL_GamepadBinding_input_axis Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods readRaw :: Ptr SDL_GamepadBinding_input_axis -> IO SDL_GamepadBinding_input_axis # | |||||
| StaticSize SDL_GamepadBinding_input_axis Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods staticSizeOf :: Proxy SDL_GamepadBinding_input_axis -> Int # staticAlignment :: Proxy SDL_GamepadBinding_input_axis -> Int # | |||||
| WriteRaw SDL_GamepadBinding_input_axis Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods writeRaw :: Ptr SDL_GamepadBinding_input_axis -> SDL_GamepadBinding_input_axis -> IO () # | |||||
| IsStruct SDL_GamepadBinding_input_axis Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods | |||||
| HasCField SDL_GamepadBinding_input_axis "axis" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
| |||||
| HasCField SDL_GamepadBinding_input_axis "axis_max" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
| |||||
| HasCField SDL_GamepadBinding_input_axis "axis_min" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
| |||||
| ty ~ CInt => HasField "axis" SDL_GamepadBinding_input_axis ty Source # |
| ||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods hasField :: SDL_GamepadBinding_input_axis -> (ty -> SDL_GamepadBinding_input_axis, ty) # | |||||
| ty ~ CInt => HasField "axis_max" SDL_GamepadBinding_input_axis ty Source # |
| ||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods hasField :: SDL_GamepadBinding_input_axis -> (ty -> SDL_GamepadBinding_input_axis, ty) # | |||||
| ty ~ CInt => HasField "axis_min" SDL_GamepadBinding_input_axis ty Source # |
| ||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods hasField :: SDL_GamepadBinding_input_axis -> (ty -> SDL_GamepadBinding_input_axis, ty) # | |||||
| ty ~ CInt => HasField "axis" (Ptr SDL_GamepadBinding_input_axis) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods getField :: Ptr SDL_GamepadBinding_input_axis -> Ptr ty # | |||||
| ty ~ CInt => HasField "axis_max" (Ptr SDL_GamepadBinding_input_axis) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods getField :: Ptr SDL_GamepadBinding_input_axis -> Ptr ty # | |||||
| ty ~ CInt => HasField "axis_min" (Ptr SDL_GamepadBinding_input_axis) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods getField :: Ptr SDL_GamepadBinding_input_axis -> Ptr ty # | |||||
| type Rep SDL_GamepadBinding_input_axis Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad type Rep SDL_GamepadBinding_input_axis = D1 ('MetaData "SDL_GamepadBinding_input_axis" "SDL3.Sys.Bindgen.Gamepad" "sdl3-bindgen-sys-0.0.1.0-inplace" 'False) (C1 ('MetaCons "SDL_GamepadBinding_input_axis" 'PrefixI 'True) (S1 ('MetaSel ('Just "axis") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CInt) :*: (S1 ('MetaSel ('Just "axis_min") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CInt) :*: S1 ('MetaSel ('Just "axis_max") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CInt)))) | |||||
| type CFieldType SDL_GamepadBinding_input_axis "axis" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||
| type CFieldType SDL_GamepadBinding_input_axis "axis_max" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||
| type CFieldType SDL_GamepadBinding_input_axis "axis_min" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||
data SDL_GamepadBinding_input_hat Source #
- C declaration
struct @SDL_GamepadBinding_input_hat, defined atSDL3/SDL_gamepad.h 282:9
Constructors
| SDL_GamepadBinding_input_hat | |
Instances
| Storable SDL_GamepadBinding_input_hat Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods sizeOf :: SDL_GamepadBinding_input_hat -> Int # alignment :: SDL_GamepadBinding_input_hat -> Int # peekElemOff :: Ptr SDL_GamepadBinding_input_hat -> Int -> IO SDL_GamepadBinding_input_hat # pokeElemOff :: Ptr SDL_GamepadBinding_input_hat -> Int -> SDL_GamepadBinding_input_hat -> IO () # peekByteOff :: Ptr b -> Int -> IO SDL_GamepadBinding_input_hat # pokeByteOff :: Ptr b -> Int -> SDL_GamepadBinding_input_hat -> IO () # peek :: Ptr SDL_GamepadBinding_input_hat -> IO SDL_GamepadBinding_input_hat # poke :: Ptr SDL_GamepadBinding_input_hat -> SDL_GamepadBinding_input_hat -> IO () # | |||||
| Generic SDL_GamepadBinding_input_hat Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
| |||||
| Show SDL_GamepadBinding_input_hat Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods showsPrec :: Int -> SDL_GamepadBinding_input_hat -> ShowS # show :: SDL_GamepadBinding_input_hat -> String # showList :: [SDL_GamepadBinding_input_hat] -> ShowS # | |||||
| Eq SDL_GamepadBinding_input_hat Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods (==) :: SDL_GamepadBinding_input_hat -> SDL_GamepadBinding_input_hat -> Bool # (/=) :: SDL_GamepadBinding_input_hat -> SDL_GamepadBinding_input_hat -> Bool # | |||||
| ReadRaw SDL_GamepadBinding_input_hat Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods readRaw :: Ptr SDL_GamepadBinding_input_hat -> IO SDL_GamepadBinding_input_hat # | |||||
| StaticSize SDL_GamepadBinding_input_hat Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods staticSizeOf :: Proxy SDL_GamepadBinding_input_hat -> Int # staticAlignment :: Proxy SDL_GamepadBinding_input_hat -> Int # | |||||
| WriteRaw SDL_GamepadBinding_input_hat Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods writeRaw :: Ptr SDL_GamepadBinding_input_hat -> SDL_GamepadBinding_input_hat -> IO () # | |||||
| IsStruct SDL_GamepadBinding_input_hat Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods | |||||
| HasCField SDL_GamepadBinding_input_hat "hat" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
| |||||
| HasCField SDL_GamepadBinding_input_hat "hat_mask" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
| |||||
| ty ~ CInt => HasField "hat" SDL_GamepadBinding_input_hat ty Source # |
| ||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods hasField :: SDL_GamepadBinding_input_hat -> (ty -> SDL_GamepadBinding_input_hat, ty) # | |||||
| ty ~ CInt => HasField "hat_mask" SDL_GamepadBinding_input_hat ty Source # |
| ||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods hasField :: SDL_GamepadBinding_input_hat -> (ty -> SDL_GamepadBinding_input_hat, ty) # | |||||
| ty ~ CInt => HasField "hat" (Ptr SDL_GamepadBinding_input_hat) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods getField :: Ptr SDL_GamepadBinding_input_hat -> Ptr ty # | |||||
| ty ~ CInt => HasField "hat_mask" (Ptr SDL_GamepadBinding_input_hat) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods getField :: Ptr SDL_GamepadBinding_input_hat -> Ptr ty # | |||||
| type Rep SDL_GamepadBinding_input_hat Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad type Rep SDL_GamepadBinding_input_hat = D1 ('MetaData "SDL_GamepadBinding_input_hat" "SDL3.Sys.Bindgen.Gamepad" "sdl3-bindgen-sys-0.0.1.0-inplace" 'False) (C1 ('MetaCons "SDL_GamepadBinding_input_hat" 'PrefixI 'True) (S1 ('MetaSel ('Just "hat") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CInt) :*: S1 ('MetaSel ('Just "hat_mask") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CInt))) | |||||
| type CFieldType SDL_GamepadBinding_input_hat "hat" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||
| type CFieldType SDL_GamepadBinding_input_hat "hat_mask" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||
newtype SDL_GamepadBinding_input Source #
- C declaration
union @SDL_GamepadBinding_input, defined atSDL3/SDL_gamepad.h 271:5
Constructors
| SDL_GamepadBinding_input | |
Instances
| Storable SDL_GamepadBinding_input Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods sizeOf :: SDL_GamepadBinding_input -> Int # alignment :: SDL_GamepadBinding_input -> Int # peekElemOff :: Ptr SDL_GamepadBinding_input -> Int -> IO SDL_GamepadBinding_input # pokeElemOff :: Ptr SDL_GamepadBinding_input -> Int -> SDL_GamepadBinding_input -> IO () # peekByteOff :: Ptr b -> Int -> IO SDL_GamepadBinding_input # pokeByteOff :: Ptr b -> Int -> SDL_GamepadBinding_input -> IO () # peek :: Ptr SDL_GamepadBinding_input -> IO SDL_GamepadBinding_input # poke :: Ptr SDL_GamepadBinding_input -> SDL_GamepadBinding_input -> IO () # | |||||
| Generic SDL_GamepadBinding_input Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
Methods from :: SDL_GamepadBinding_input -> Rep SDL_GamepadBinding_input x # to :: Rep SDL_GamepadBinding_input x -> SDL_GamepadBinding_input # | |||||
| ReadRaw SDL_GamepadBinding_input Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods readRaw :: Ptr SDL_GamepadBinding_input -> IO SDL_GamepadBinding_input # | |||||
| StaticSize SDL_GamepadBinding_input Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods | |||||
| WriteRaw SDL_GamepadBinding_input Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods writeRaw :: Ptr SDL_GamepadBinding_input -> SDL_GamepadBinding_input -> IO () # | |||||
| IsUnion SDL_GamepadBinding_input Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods | |||||
| HasCField SDL_GamepadBinding_input "axis" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
| |||||
| HasCField SDL_GamepadBinding_input "button" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
| |||||
| HasCField SDL_GamepadBinding_input "hat" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
| |||||
| ty ~ SDL_GamepadBinding_input_axis => HasField "axis" SDL_GamepadBinding_input ty Source # |
| ||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods hasField :: SDL_GamepadBinding_input -> (ty -> SDL_GamepadBinding_input, ty) # | |||||
| ty ~ CInt => HasField "button" SDL_GamepadBinding_input ty Source # |
| ||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods hasField :: SDL_GamepadBinding_input -> (ty -> SDL_GamepadBinding_input, ty) # | |||||
| ty ~ SDL_GamepadBinding_input_hat => HasField "hat" SDL_GamepadBinding_input ty Source # |
| ||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods hasField :: SDL_GamepadBinding_input -> (ty -> SDL_GamepadBinding_input, ty) # | |||||
| ty ~ SDL_GamepadBinding_input_axis => HasField "axis" SDL_GamepadBinding_input (ty :: Type) Source # |
| ||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods getField :: SDL_GamepadBinding_input -> ty # | |||||
| ty ~ CInt => HasField "button" SDL_GamepadBinding_input (ty :: Type) Source # |
| ||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods getField :: SDL_GamepadBinding_input -> ty # | |||||
| ty ~ SDL_GamepadBinding_input_hat => HasField "hat" SDL_GamepadBinding_input (ty :: Type) Source # |
| ||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods getField :: SDL_GamepadBinding_input -> ty # | |||||
| ty ~ SDL_GamepadBinding_input_axis => HasField "axis" (Ptr SDL_GamepadBinding_input) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods getField :: Ptr SDL_GamepadBinding_input -> Ptr ty # | |||||
| ty ~ CInt => HasField "button" (Ptr SDL_GamepadBinding_input) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods getField :: Ptr SDL_GamepadBinding_input -> Ptr ty # | |||||
| ty ~ SDL_GamepadBinding_input_hat => HasField "hat" (Ptr SDL_GamepadBinding_input) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods getField :: Ptr SDL_GamepadBinding_input -> Ptr ty # | |||||
| type Rep SDL_GamepadBinding_input Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad type Rep SDL_GamepadBinding_input = D1 ('MetaData "SDL_GamepadBinding_input" "SDL3.Sys.Bindgen.Gamepad" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_GamepadBinding_input" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteArray))) | |||||
| type CFieldType SDL_GamepadBinding_input "axis" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||
| type CFieldType SDL_GamepadBinding_input "button" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||
| type CFieldType SDL_GamepadBinding_input "hat" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||
data SDL_GamepadBinding_output_axis Source #
- C declaration
struct @SDL_GamepadBinding_output_axis, defined atSDL3/SDL_gamepad.h 295:9
Constructors
| SDL_GamepadBinding_output_axis | |
Instances
| Storable SDL_GamepadBinding_output_axis Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods sizeOf :: SDL_GamepadBinding_output_axis -> Int # alignment :: SDL_GamepadBinding_output_axis -> Int # peekElemOff :: Ptr SDL_GamepadBinding_output_axis -> Int -> IO SDL_GamepadBinding_output_axis # pokeElemOff :: Ptr SDL_GamepadBinding_output_axis -> Int -> SDL_GamepadBinding_output_axis -> IO () # peekByteOff :: Ptr b -> Int -> IO SDL_GamepadBinding_output_axis # pokeByteOff :: Ptr b -> Int -> SDL_GamepadBinding_output_axis -> IO () # peek :: Ptr SDL_GamepadBinding_output_axis -> IO SDL_GamepadBinding_output_axis # poke :: Ptr SDL_GamepadBinding_output_axis -> SDL_GamepadBinding_output_axis -> IO () # | |||||
| Generic SDL_GamepadBinding_output_axis Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
| |||||
| Show SDL_GamepadBinding_output_axis Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods showsPrec :: Int -> SDL_GamepadBinding_output_axis -> ShowS # show :: SDL_GamepadBinding_output_axis -> String # showList :: [SDL_GamepadBinding_output_axis] -> ShowS # | |||||
| Eq SDL_GamepadBinding_output_axis Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||
| ReadRaw SDL_GamepadBinding_output_axis Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||
| StaticSize SDL_GamepadBinding_output_axis Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods staticSizeOf :: Proxy SDL_GamepadBinding_output_axis -> Int # staticAlignment :: Proxy SDL_GamepadBinding_output_axis -> Int # | |||||
| WriteRaw SDL_GamepadBinding_output_axis Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods writeRaw :: Ptr SDL_GamepadBinding_output_axis -> SDL_GamepadBinding_output_axis -> IO () # | |||||
| IsStruct SDL_GamepadBinding_output_axis Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods | |||||
| HasCField SDL_GamepadBinding_output_axis "axis" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
| |||||
| HasCField SDL_GamepadBinding_output_axis "axis_max" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
| |||||
| HasCField SDL_GamepadBinding_output_axis "axis_min" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
| |||||
| ty ~ SDL_GamepadAxis => HasField "axis" SDL_GamepadBinding_output_axis ty Source # |
| ||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods hasField :: SDL_GamepadBinding_output_axis -> (ty -> SDL_GamepadBinding_output_axis, ty) # | |||||
| ty ~ CInt => HasField "axis_max" SDL_GamepadBinding_output_axis ty Source # |
| ||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods hasField :: SDL_GamepadBinding_output_axis -> (ty -> SDL_GamepadBinding_output_axis, ty) # | |||||
| ty ~ CInt => HasField "axis_min" SDL_GamepadBinding_output_axis ty Source # |
| ||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods hasField :: SDL_GamepadBinding_output_axis -> (ty -> SDL_GamepadBinding_output_axis, ty) # | |||||
| ty ~ SDL_GamepadAxis => HasField "axis" (Ptr SDL_GamepadBinding_output_axis) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods getField :: Ptr SDL_GamepadBinding_output_axis -> Ptr ty # | |||||
| ty ~ CInt => HasField "axis_max" (Ptr SDL_GamepadBinding_output_axis) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods getField :: Ptr SDL_GamepadBinding_output_axis -> Ptr ty # | |||||
| ty ~ CInt => HasField "axis_min" (Ptr SDL_GamepadBinding_output_axis) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods getField :: Ptr SDL_GamepadBinding_output_axis -> Ptr ty # | |||||
| type Rep SDL_GamepadBinding_output_axis Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad type Rep SDL_GamepadBinding_output_axis = D1 ('MetaData "SDL_GamepadBinding_output_axis" "SDL3.Sys.Bindgen.Gamepad" "sdl3-bindgen-sys-0.0.1.0-inplace" 'False) (C1 ('MetaCons "SDL_GamepadBinding_output_axis" 'PrefixI 'True) (S1 ('MetaSel ('Just "axis") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SDL_GamepadAxis) :*: (S1 ('MetaSel ('Just "axis_min") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CInt) :*: S1 ('MetaSel ('Just "axis_max") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CInt)))) | |||||
| type CFieldType SDL_GamepadBinding_output_axis "axis" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||
| type CFieldType SDL_GamepadBinding_output_axis "axis_max" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||
| type CFieldType SDL_GamepadBinding_output_axis "axis_min" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||
newtype SDL_GamepadBinding_output Source #
- C declaration
union @SDL_GamepadBinding_output, defined atSDL3/SDL_gamepad.h 291:5
Constructors
| SDL_GamepadBinding_output | |
Instances
| Storable SDL_GamepadBinding_output Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods sizeOf :: SDL_GamepadBinding_output -> Int # alignment :: SDL_GamepadBinding_output -> Int # peekElemOff :: Ptr SDL_GamepadBinding_output -> Int -> IO SDL_GamepadBinding_output # pokeElemOff :: Ptr SDL_GamepadBinding_output -> Int -> SDL_GamepadBinding_output -> IO () # peekByteOff :: Ptr b -> Int -> IO SDL_GamepadBinding_output # pokeByteOff :: Ptr b -> Int -> SDL_GamepadBinding_output -> IO () # peek :: Ptr SDL_GamepadBinding_output -> IO SDL_GamepadBinding_output # poke :: Ptr SDL_GamepadBinding_output -> SDL_GamepadBinding_output -> IO () # | |||||
| Generic SDL_GamepadBinding_output Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
Methods from :: SDL_GamepadBinding_output -> Rep SDL_GamepadBinding_output x # to :: Rep SDL_GamepadBinding_output x -> SDL_GamepadBinding_output # | |||||
| ReadRaw SDL_GamepadBinding_output Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods readRaw :: Ptr SDL_GamepadBinding_output -> IO SDL_GamepadBinding_output # | |||||
| StaticSize SDL_GamepadBinding_output Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods | |||||
| WriteRaw SDL_GamepadBinding_output Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods writeRaw :: Ptr SDL_GamepadBinding_output -> SDL_GamepadBinding_output -> IO () # | |||||
| IsUnion SDL_GamepadBinding_output Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods | |||||
| HasCField SDL_GamepadBinding_output "axis" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
| |||||
| HasCField SDL_GamepadBinding_output "button" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
| |||||
| ty ~ SDL_GamepadBinding_output_axis => HasField "axis" SDL_GamepadBinding_output ty Source # |
| ||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods hasField :: SDL_GamepadBinding_output -> (ty -> SDL_GamepadBinding_output, ty) # | |||||
| ty ~ SDL_GamepadButton => HasField "button" SDL_GamepadBinding_output ty Source # |
| ||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods hasField :: SDL_GamepadBinding_output -> (ty -> SDL_GamepadBinding_output, ty) # | |||||
| ty ~ SDL_GamepadBinding_output_axis => HasField "axis" SDL_GamepadBinding_output (ty :: Type) Source # |
| ||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods getField :: SDL_GamepadBinding_output -> ty # | |||||
| ty ~ SDL_GamepadButton => HasField "button" SDL_GamepadBinding_output (ty :: Type) Source # |
| ||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods getField :: SDL_GamepadBinding_output -> ty # | |||||
| ty ~ SDL_GamepadBinding_output_axis => HasField "axis" (Ptr SDL_GamepadBinding_output) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods getField :: Ptr SDL_GamepadBinding_output -> Ptr ty # | |||||
| ty ~ SDL_GamepadButton => HasField "button" (Ptr SDL_GamepadBinding_output) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods getField :: Ptr SDL_GamepadBinding_output -> Ptr ty # | |||||
| type Rep SDL_GamepadBinding_output Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad type Rep SDL_GamepadBinding_output = D1 ('MetaData "SDL_GamepadBinding_output" "SDL3.Sys.Bindgen.Gamepad" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_GamepadBinding_output" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteArray))) | |||||
| type CFieldType SDL_GamepadBinding_output "axis" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||
| type CFieldType SDL_GamepadBinding_output "button" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||
data SDL_GamepadBinding Source #
A mapping between one joystick input to a gamepad control.
A gamepad has a collection of several bindings, to say, for example, when joystick button number 5 is pressed, that should be treated like the gamepad's "start" button.
SDL has these bindings built-in for many popular controllers, and can add more with a simple text string. Those strings are parsed into a collection of these structs to make it easier to operate on the data.
- See also
sDL_GetGamepadBindings- C declaration
struct SDL_GamepadBinding, defined atSDL3/SDL_gamepad.h 268:16
Since: 3.2.0
Constructors
| SDL_GamepadBinding | |
Fields
| |
Instances
| Storable SDL_GamepadBinding Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods sizeOf :: SDL_GamepadBinding -> Int # alignment :: SDL_GamepadBinding -> Int # peekElemOff :: Ptr SDL_GamepadBinding -> Int -> IO SDL_GamepadBinding # pokeElemOff :: Ptr SDL_GamepadBinding -> Int -> SDL_GamepadBinding -> IO () # peekByteOff :: Ptr b -> Int -> IO SDL_GamepadBinding # pokeByteOff :: Ptr b -> Int -> SDL_GamepadBinding -> IO () # peek :: Ptr SDL_GamepadBinding -> IO SDL_GamepadBinding # poke :: Ptr SDL_GamepadBinding -> SDL_GamepadBinding -> IO () # | |||||
| Generic SDL_GamepadBinding Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
Methods from :: SDL_GamepadBinding -> Rep SDL_GamepadBinding x # to :: Rep SDL_GamepadBinding x -> SDL_GamepadBinding # | |||||
| ReadRaw SDL_GamepadBinding Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods readRaw :: Ptr SDL_GamepadBinding -> IO SDL_GamepadBinding # | |||||
| StaticSize SDL_GamepadBinding Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods staticSizeOf :: Proxy SDL_GamepadBinding -> Int # | |||||
| WriteRaw SDL_GamepadBinding Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods writeRaw :: Ptr SDL_GamepadBinding -> SDL_GamepadBinding -> IO () # | |||||
| IsStruct SDL_GamepadBinding Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods | |||||
| HasCField SDL_GamepadBinding "input" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
| |||||
| HasCField SDL_GamepadBinding "input_type" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
| |||||
| HasCField SDL_GamepadBinding "output" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
| |||||
| HasCField SDL_GamepadBinding "output_type" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Associated Types
| |||||
| ty ~ SDL_GamepadBinding_input => HasField "input" SDL_GamepadBinding ty Source # |
| ||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods hasField :: SDL_GamepadBinding -> (ty -> SDL_GamepadBinding, ty) # | |||||
| ty ~ SDL_GamepadBindingType => HasField "input_type" SDL_GamepadBinding ty Source # |
| ||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods hasField :: SDL_GamepadBinding -> (ty -> SDL_GamepadBinding, ty) # | |||||
| ty ~ SDL_GamepadBinding_output => HasField "output" SDL_GamepadBinding ty Source # |
| ||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods hasField :: SDL_GamepadBinding -> (ty -> SDL_GamepadBinding, ty) # | |||||
| ty ~ SDL_GamepadBindingType => HasField "output_type" SDL_GamepadBinding ty Source # |
| ||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods hasField :: SDL_GamepadBinding -> (ty -> SDL_GamepadBinding, ty) # | |||||
| ty ~ SDL_GamepadBinding_input => HasField "input" (Ptr SDL_GamepadBinding) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods getField :: Ptr SDL_GamepadBinding -> Ptr ty # | |||||
| ty ~ SDL_GamepadBindingType => HasField "input_type" (Ptr SDL_GamepadBinding) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods getField :: Ptr SDL_GamepadBinding -> Ptr ty # | |||||
| ty ~ SDL_GamepadBinding_output => HasField "output" (Ptr SDL_GamepadBinding) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods getField :: Ptr SDL_GamepadBinding -> Ptr ty # | |||||
| ty ~ SDL_GamepadBindingType => HasField "output_type" (Ptr SDL_GamepadBinding) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad Methods getField :: Ptr SDL_GamepadBinding -> Ptr ty # | |||||
| type Rep SDL_GamepadBinding Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad type Rep SDL_GamepadBinding = D1 ('MetaData "SDL_GamepadBinding" "SDL3.Sys.Bindgen.Gamepad" "sdl3-bindgen-sys-0.0.1.0-inplace" 'False) (C1 ('MetaCons "SDL_GamepadBinding" 'PrefixI 'True) ((S1 ('MetaSel ('Just "input_type") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SDL_GamepadBindingType) :*: S1 ('MetaSel ('Just "input") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SDL_GamepadBinding_input)) :*: (S1 ('MetaSel ('Just "output_type") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SDL_GamepadBindingType) :*: S1 ('MetaSel ('Just "output") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SDL_GamepadBinding_output)))) | |||||
| type CFieldType SDL_GamepadBinding "input" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||
| type CFieldType SDL_GamepadBinding "input_type" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||
| type CFieldType SDL_GamepadBinding "output" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||
| type CFieldType SDL_GamepadBinding "output_type" Source # | |||||
Defined in SDL3.Sys.Bindgen.Gamepad | |||||