Copyright | (c) David Himmelstrup 2005 |
---|---|
License | BSD-like |
Maintainer | [email protected] |
Stability | provisional |
Portability | portable |
Safe Haskell | None |
Language | Haskell98 |
Graphics.UI.SDL.Joystick
Description
Synopsis
- countAvailable :: IO Int
- tryName :: JoystickIndex -> IO (Maybe String)
- name :: JoystickIndex -> IO String
- tryOpen :: JoystickIndex -> IO (Maybe Joystick)
- open :: JoystickIndex -> IO Joystick
- opened :: JoystickIndex -> IO Bool
- index :: Joystick -> JoystickIndex
- axesAvailable :: Joystick -> Int
- ballsAvailable :: Joystick -> Int
- hatsAvailable :: Joystick -> Int
- buttonsAvailable :: Joystick -> Int
- update :: IO ()
- getAxis :: Joystick -> Word8 -> IO Int16
- getHat :: Joystick -> Word8 -> IO [Hat]
- getButton :: Joystick -> Word8 -> IO Bool
- getBall :: Joystick -> Word8 -> IO (Maybe (Int16, Int16))
- close :: Joystick -> IO ()
Documentation
countAvailable :: IO Int Source #
Counts the number of joysticks attached to the system.
tryOpen :: JoystickIndex -> IO (Maybe Joystick) Source #
Opens a joystick for use. Returns Nothing
on error.
open :: JoystickIndex -> IO Joystick Source #
Opens a joystick for use. Throws an exception on error.
axesAvailable :: Joystick -> Int Source #
Gets the number of joystick axes.
ballsAvailable :: Joystick -> Int Source #
Gets the number of joystick trackballs.
hatsAvailable :: Joystick -> Int Source #
Gets the number of joystick hats.
buttonsAvailable :: Joystick -> Int Source #
Gets the number of joystick buttons.