SDL-0.4.0: Binding to libSDLSource codeContentsIndex
Graphics.UI.SDL.Joystick
Portabilityportable
Stabilityprovisional
Maintainerlemmih@gmail.com
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 IntSource
Counts the number of joysticks attached to the system.
tryName :: JoystickIndex -> IO (Maybe String)Source
Gets joystick name. Returns Nothing on error.
name :: JoystickIndex -> IO StringSource
Gets joystick name. Throws an exception on error.
tryOpen :: JoystickIndex -> IO (Maybe Joystick)Source
Opens a joystick for use. Returns Nothing on error.
open :: JoystickIndex -> IO JoystickSource
Opens a joystick for use. Throws an exception on error.
opened :: JoystickIndex -> IO BoolSource
Determines if a joystick has been opened.
index :: Joystick -> JoystickIndexSource
Gets the index of an Joystick.
axesAvailable :: Joystick -> IntSource
Gets the number of joystick axes.
ballsAvailable :: Joystick -> IntSource
Gets the number of joystick trackballs.
hatsAvailable :: Joystick -> IntSource
Gets the number of joystick hats.
buttonsAvailable :: Joystick -> IntSource
Gets the number of joystick buttons.
update :: IO ()Source
Updates the state of all joysticks.
getAxis :: Joystick -> Word8 -> IO Int16Source
Gets the current state of an axis.
getHat :: Joystick -> Word8 -> IO [Hat]Source
Gets the current state of a joystick hat.
getButton :: Joystick -> Word8 -> IO BoolSource
Gets the current state of a given button on a given joystick.
getBall :: Joystick -> Word8 -> IO (Maybe (Int16, Int16))Source
Gets relative trackball motion.
close :: Joystick -> IO ()Source
Force finalization of a previous opened Joystick. Only supported with GHC.
Produced by Haddock version 0.8