SDL-0.6.5.1: Binding to libSDL

Copyright(c) David Himmelstrup 2005
LicenseBSD-like
Maintainerlemmih@gmail.com
Stabilityprovisional
Portabilityportable
Safe HaskellNone
LanguageHaskell98

Graphics.UI.SDL.Joystick

Description

 

Synopsis

Documentation

countAvailable :: IO Int #

Counts the number of joysticks attached to the system.

tryName :: JoystickIndex -> IO (Maybe String) #

Gets joystick name. Returns Nothing on error.

name :: JoystickIndex -> IO String #

Gets joystick name. Throws an exception on error.

tryOpen :: JoystickIndex -> IO (Maybe Joystick) #

Opens a joystick for use. Returns Nothing on error.

open :: JoystickIndex -> IO Joystick #

Opens a joystick for use. Throws an exception on error.

opened :: JoystickIndex -> IO Bool #

Determines if a joystick has been opened.

index :: Joystick -> JoystickIndex #

Gets the index of an Joystick.

axesAvailable :: Joystick -> Int #

Gets the number of joystick axes.

ballsAvailable :: Joystick -> Int #

Gets the number of joystick trackballs.

hatsAvailable :: Joystick -> Int #

Gets the number of joystick hats.

buttonsAvailable :: Joystick -> Int #

Gets the number of joystick buttons.

update :: IO () #

Updates the state of all joysticks.

getAxis :: Joystick -> Word8 -> IO Int16 #

Gets the current state of an axis.

getHat :: Joystick -> Word8 -> IO [Hat] #

Gets the current state of a joystick hat.

getButton :: Joystick -> Word8 -> IO Bool #

Gets the current state of a given button on a given joystick.

getBall :: Joystick -> Word8 -> IO (Maybe (Int16, Int16)) #

Gets relative trackball motion.

close :: Joystick -> IO () #

Force finalization of a previous opened Joystick. Only supported with GHC.