sdl2-2.4.1.0: Both high- and low-level bindings to the SDL library (version 2.0.4+).

Safe Haskell | Safe
Language | Haskell2010

SDL.Input.GameController

Synopsis

- data ControllerButton
  - = ControllerButtonInvalid
  - | ControllerButtonA
  - | ControllerButtonB
  - | ControllerButtonX
  - | ControllerButtonY
  - | ControllerButtonBack
  - | ControllerButtonGuide
  - | ControllerButtonStart
  - | ControllerButtonLeftStick
  - | ControllerButtonRightStick
  - | ControllerButtonLeftShoulder
  - | ControllerButtonRightShoulder
  - | ControllerButtonDpadUp
  - | ControllerButtonDpadDown
  - | ControllerButtonDpadLeft
  - | ControllerButtonDpadRight
- data ControllerButtonState
  - = ControllerButtonPressed
  - | ControllerButtonReleased
  - | ControllerButtonInvalidState
- data ControllerDeviceConnection
  - = ControllerDeviceAdded
  - | ControllerDeviceRemoved
  - | ControllerDeviceRemapped

# Documentation

data ControllerButton Source #

Identifies a gamepad button.

Constructors

ControllerButtonInvalid |
ControllerButtonA |
ControllerButtonB |
ControllerButtonX |
ControllerButtonY |
ControllerButtonBack |
ControllerButtonGuide |
ControllerButtonStart |
ControllerButtonLeftStick |
ControllerButtonRightStick |
ControllerButtonLeftShoulder |
ControllerButtonRightShoulder |
ControllerButtonDpadUp |
ControllerButtonDpadDown |
ControllerButtonDpadLeft |
ControllerButtonDpadRight |

Instances

Eq ControllerButton Source # |
Instance details Defined in SDL.Input.GameController Methods (==) :: ControllerButton -> ControllerButton -> Bool Source # (/=) :: ControllerButton -> ControllerButton -> Bool Source #
Data ControllerButton Source # |

Instance details

Defined in SDL.Input.GameController

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ControllerButton -> c ControllerButton Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ControllerButton Source #

toConstr :: ControllerButton -> Constr Source #

dataTypeOf :: ControllerButton -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ControllerButton) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ControllerButton) Source #

gmapT :: (forall b. Data b => b -> b) -> ControllerButton -> ControllerButton Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ControllerButton -> r Source #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ControllerButton -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> ControllerButton -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ControllerButton -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ControllerButton -> m ControllerButton Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ControllerButton -> m ControllerButton Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ControllerButton -> m ControllerButton Source #

Ord ControllerButton Source # |

Instance details

Defined in SDL.Input.GameController

Methods

compare :: ControllerButton -> ControllerButton -> Ordering Source #

(<) :: ControllerButton -> ControllerButton -> Bool Source #

(<=) :: ControllerButton -> ControllerButton -> Bool Source #

(>) :: ControllerButton -> ControllerButton -> Bool Source #

(>=) :: ControllerButton -> ControllerButton -> Bool Source #

max :: ControllerButton -> ControllerButton -> ControllerButton Source #

min :: ControllerButton -> ControllerButton -> ControllerButton Source #

Read ControllerButton Source # |
Instance details Defined in SDL.Input.GameController Methods readsPrec :: Int -> ReadS ControllerButton Source # readList :: ReadS [ControllerButton] Source # readPrec :: ReadPrec ControllerButton Source # readListPrec :: ReadPrec [ControllerButton] Source #
Show ControllerButton Source # |
Instance details Defined in SDL.Input.GameController Methods showsPrec :: Int -> ControllerButton -> ShowS Source # show :: ControllerButton -> String Source # showList :: [ControllerButton] -> ShowS Source #
Generic ControllerButton Source # |
Instance details Defined in SDL.Input.GameController Associated Types type Rep ControllerButton :: Type -> Type Source # Methods from :: ControllerButton -> Rep ControllerButton x Source # to :: Rep ControllerButton x -> ControllerButton Source #
FromNumber ControllerButton Int32 Source # |
Instance details Defined in SDL.Input.GameController Methods fromNumber :: Int32 -> ControllerButton Source #
type Rep ControllerButton Source # |

Instance details

Defined in SDL.Input.GameController

type Rep ControllerButton = D1 (MetaData "ControllerButton" "SDL.Input.GameController" "sdl2-2.4.1.0-6o74Vl5oJciK9nOaeyWqit" False) ((((C1 (MetaCons "ControllerButtonInvalid" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "ControllerButtonA" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "ControllerButtonB" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "ControllerButtonX" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "ControllerButtonY" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "ControllerButtonBack" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "ControllerButtonGuide" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "ControllerButtonStart" PrefixI False) (U1 :: Type -> Type)))) :+: (((C1 (MetaCons "ControllerButtonLeftStick" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "ControllerButtonRightStick" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "ControllerButtonLeftShoulder" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "ControllerButtonRightShoulder" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "ControllerButtonDpadUp" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "ControllerButtonDpadDown" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "ControllerButtonDpadLeft" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "ControllerButtonDpadRight" PrefixI False) (U1 :: Type -> Type)))))

data ControllerButtonState Source #

Identifies the state of a controller button.

Constructors

ControllerButtonPressed |
ControllerButtonReleased |
ControllerButtonInvalidState |

Instances

Eq ControllerButtonState Source # |
Instance details Defined in SDL.Input.GameController Methods (==) :: ControllerButtonState -> ControllerButtonState -> Bool Source # (/=) :: ControllerButtonState -> ControllerButtonState -> Bool Source #
Data ControllerButtonState Source # |

Instance details

Defined in SDL.Input.GameController

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ControllerButtonState -> c ControllerButtonState Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ControllerButtonState Source #

toConstr :: ControllerButtonState -> Constr Source #

dataTypeOf :: ControllerButtonState -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ControllerButtonState) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ControllerButtonState) Source #

gmapT :: (forall b. Data b => b -> b) -> ControllerButtonState -> ControllerButtonState Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ControllerButtonState -> r Source #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ControllerButtonState -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> ControllerButtonState -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ControllerButtonState -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ControllerButtonState -> m ControllerButtonState Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ControllerButtonState -> m ControllerButtonState Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ControllerButtonState -> m ControllerButtonState Source #

Ord ControllerButtonState Source # |

Instance details

Defined in SDL.Input.GameController

Methods

compare :: ControllerButtonState -> ControllerButtonState -> Ordering Source #

(<) :: ControllerButtonState -> ControllerButtonState -> Bool Source #

(<=) :: ControllerButtonState -> ControllerButtonState -> Bool Source #

(>) :: ControllerButtonState -> ControllerButtonState -> Bool Source #

(>=) :: ControllerButtonState -> ControllerButtonState -> Bool Source #

max :: ControllerButtonState -> ControllerButtonState -> ControllerButtonState Source #

min :: ControllerButtonState -> ControllerButtonState -> ControllerButtonState Source #

Read ControllerButtonState Source # |
Instance details Defined in SDL.Input.GameController Methods readsPrec :: Int -> ReadS ControllerButtonState Source # readList :: ReadS [ControllerButtonState] Source # readPrec :: ReadPrec ControllerButtonState Source # readListPrec :: ReadPrec [ControllerButtonState] Source #
Show ControllerButtonState Source # |
Instance details Defined in SDL.Input.GameController Methods showsPrec :: Int -> ControllerButtonState -> ShowS Source # show :: ControllerButtonState -> String Source # showList :: [ControllerButtonState] -> ShowS Source #
Generic ControllerButtonState Source # |
Instance details Defined in SDL.Input.GameController Associated Types type Rep ControllerButtonState :: Type -> Type Source # Methods from :: ControllerButtonState -> Rep ControllerButtonState x Source # to :: Rep ControllerButtonState x -> ControllerButtonState Source #
FromNumber ControllerButtonState Word32 Source # |
Instance details Defined in SDL.Input.GameController Methods fromNumber :: Word32 -> ControllerButtonState Source #
type Rep ControllerButtonState Source # |

Instance details

Defined in SDL.Input.GameController

type Rep ControllerButtonState = D1 (MetaData "ControllerButtonState" "SDL.Input.GameController" "sdl2-2.4.1.0-6o74Vl5oJciK9nOaeyWqit" False) (C1 (MetaCons "ControllerButtonPressed" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "ControllerButtonReleased" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "ControllerButtonInvalidState" PrefixI False) (U1 :: Type -> Type)))

data ControllerDeviceConnection Source #

Identified whether the game controller was added, removed, or remapped.

Constructors

ControllerDeviceAdded |
ControllerDeviceRemoved |
ControllerDeviceRemapped |

Instances

Eq ControllerDeviceConnection Source # |
Instance details Defined in SDL.Input.GameController Methods (==) :: ControllerDeviceConnection -> ControllerDeviceConnection -> Bool Source # (/=) :: ControllerDeviceConnection -> ControllerDeviceConnection -> Bool Source #
Data ControllerDeviceConnection Source # |

Instance details

Defined in SDL.Input.GameController

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ControllerDeviceConnection -> c ControllerDeviceConnection Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ControllerDeviceConnection Source #

toConstr :: ControllerDeviceConnection -> Constr Source #

dataTypeOf :: ControllerDeviceConnection -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ControllerDeviceConnection) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ControllerDeviceConnection) Source #

gmapT :: (forall b. Data b => b -> b) -> ControllerDeviceConnection -> ControllerDeviceConnection Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ControllerDeviceConnection -> r Source #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ControllerDeviceConnection -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> ControllerDeviceConnection -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ControllerDeviceConnection -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ControllerDeviceConnection -> m ControllerDeviceConnection Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ControllerDeviceConnection -> m ControllerDeviceConnection Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ControllerDeviceConnection -> m ControllerDeviceConnection Source #

Ord ControllerDeviceConnection Source # |

Instance details

Defined in SDL.Input.GameController

Methods

compare :: ControllerDeviceConnection -> ControllerDeviceConnection -> Ordering Source #

(<) :: ControllerDeviceConnection -> ControllerDeviceConnection -> Bool Source #

(<=) :: ControllerDeviceConnection -> ControllerDeviceConnection -> Bool Source #

(>) :: ControllerDeviceConnection -> ControllerDeviceConnection -> Bool Source #

(>=) :: ControllerDeviceConnection -> ControllerDeviceConnection -> Bool Source #

max :: ControllerDeviceConnection -> ControllerDeviceConnection -> ControllerDeviceConnection Source #

min :: ControllerDeviceConnection -> ControllerDeviceConnection -> ControllerDeviceConnection Source #

Read ControllerDeviceConnection Source # |
Instance details Defined in SDL.Input.GameController Methods readsPrec :: Int -> ReadS ControllerDeviceConnection Source # readList :: ReadS [ControllerDeviceConnection] Source # readPrec :: ReadPrec ControllerDeviceConnection Source # readListPrec :: ReadPrec [ControllerDeviceConnection] Source #
Show ControllerDeviceConnection Source # |
Instance details Defined in SDL.Input.GameController Methods showsPrec :: Int -> ControllerDeviceConnection -> ShowS Source # show :: ControllerDeviceConnection -> String Source # showList :: [ControllerDeviceConnection] -> ShowS Source #
Generic ControllerDeviceConnection Source # |
Instance details Defined in SDL.Input.GameController Associated Types type Rep ControllerDeviceConnection :: Type -> Type Source # Methods from :: ControllerDeviceConnection -> Rep ControllerDeviceConnection x Source # to :: Rep ControllerDeviceConnection x -> ControllerDeviceConnection Source #
FromNumber ControllerDeviceConnection Word32 Source # |
Instance details Defined in SDL.Input.GameController Methods fromNumber :: Word32 -> ControllerDeviceConnection Source #
type Rep ControllerDeviceConnection Source # |

Instance details

Defined in SDL.Input.GameController

type Rep ControllerDeviceConnection = D1 (MetaData "ControllerDeviceConnection" "SDL.Input.GameController" "sdl2-2.4.1.0-6o74Vl5oJciK9nOaeyWqit" False) (C1 (MetaCons "ControllerDeviceAdded" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "ControllerDeviceRemoved" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "ControllerDeviceRemapped" PrefixI False) (U1 :: Type -> Type)))