| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Affection.Subsystems.AffectionJoystick
Synopsis
- consumeSDLJoystickEvents :: forall am us. (Participant am us, Mesg am us ~ JoystickMessage) => am -> [EventPayload] -> Affection us [EventPayload]
- joystickAutoConnect :: JoystickMessage -> Affection us (Maybe Joystick)
- joystickAutoDisconnect :: [Joystick] -> JoystickMessage -> Affection us [Joystick]
Documentation
consumeSDLJoystickEvents Source #
Arguments
| :: (Participant am us, Mesg am us ~ JoystickMessage) | |
| => am | The message system participant |
| -> [EventPayload] | Incoming events |
| -> Affection us [EventPayload] | Leftover SDL events |
Helper function that consumes all Joystick-related EventPayloads
and emits appropriate JoystickMessages
Arguments
| :: JoystickMessage | Any |
| -> Affection us (Maybe Joystick) | Returns a joystick descriptor, if successful |
Helper function to automatically connect and open newly attached joystick devices
joystickAutoDisconnect Source #
Arguments
| :: [Joystick] | List of Joystick descriptors |
| -> JoystickMessage | Any |
| -> Affection us [Joystick] | Returns altered list of Joystick descriptors |
Helper function to automatically close and disconnect freshly detached joystick devices