module Graphics.UI.SDL.Event (
addEventWatch,
delEventWatch,
eventState,
filterEvents,
flushEvent,
flushEvents,
getEventFilter,
getNumTouchDevices,
getNumTouchFingers,
getTouchDevice,
getTouchFinger,
hasEvent,
hasEvents,
loadDollarTemplates,
peepEvents,
pollEvent,
pumpEvents,
pushEvent,
quitRequested,
recordGesture,
registerEvents,
saveAllDollarTemplates,
saveDollarTemplate,
setEventFilter,
waitEvent,
waitEventTimeout,
getKeyFromName,
getKeyFromScancode,
getKeyName,
getKeyboardFocus,
getKeyboardState,
getModState,
getScancodeFromKey,
getScancodeFromName,
getScancodeName,
hasScreenKeyboardSupport,
isScreenKeyboardShown,
isTextInputActive,
setModState,
setTextInputRect,
startTextInput,
stopTextInput,
createColorCursor,
createCursor,
createSystemCursor,
freeCursor,
getCursor,
getDefaultCursor,
getMouseFocus,
getMouseState,
getRelativeMouseMode,
getRelativeMouseState,
setCursor,
setRelativeMouseMode,
showCursor,
warpMouseInWindow,
joystickClose,
joystickEventState,
joystickGetAttached,
joystickGetAxis,
joystickGetBall,
joystickGetButton,
joystickGetDeviceGUID,
joystickGetGUID,
joystickGetGUIDFromString,
joystickGetGUIDString,
joystickGetHat,
joystickInstanceID,
joystickName,
joystickNameForIndex,
joystickNumAxes,
joystickNumBalls,
joystickNumButtons,
joystickNumHats,
joystickOpen,
joystickUpdate,
numJoysticks,
gameControllerAddMapping,
gameControllerAddMappingsFromFile,
gameControllerAddMappingsFromRW,
gameControllerClose,
gameControllerEventState,
gameControllerGetAttached,
gameControllerGetAxis,
gameControllerGetAxisFromString,
gameControllerGetBindForAxis,
gameControllerGetBindForButton,
gameControllerGetButton,
gameControllerGetButtonFromString,
gameControllerGetJoystick,
gameControllerGetStringForAxis,
gameControllerGetStringForButton,
gameControllerMapping,
gameControllerMappingForGUID,
gameControllerName,
gameControllerNameForIndex,
gameControllerOpen,
gameControllerUpdate,
isGameController
) where
import Control.Monad.IO.Class
import Data.Int
import Data.Word
import Foreign.C.String
import Foreign.C.Types
import Foreign.Marshal.Alloc
import Foreign.Ptr
import Foreign.Storable
import Graphics.UI.SDL.Enum
import Graphics.UI.SDL.Filesystem
import Graphics.UI.SDL.Types
foreign import ccall "SDL.h SDL_AddEventWatch" addEventWatch' :: EventFilter -> Ptr () -> IO ()
foreign import ccall "SDL.h SDL_DelEventWatch" delEventWatch' :: EventFilter -> Ptr () -> IO ()
foreign import ccall "SDL.h SDL_EventState" eventState' :: Word32 -> CInt -> IO Word8
foreign import ccall "SDL.h SDL_FilterEvents" filterEvents' :: EventFilter -> Ptr () -> IO ()
foreign import ccall "SDL.h SDL_FlushEvent" flushEvent' :: Word32 -> IO ()
foreign import ccall "SDL.h SDL_FlushEvents" flushEvents' :: Word32 -> Word32 -> IO ()
foreign import ccall "SDL.h SDL_GetEventFilter" getEventFilter' :: Ptr EventFilter -> Ptr (Ptr ()) -> IO Bool
foreign import ccall "SDL.h SDL_GetNumTouchDevices" getNumTouchDevices' :: IO CInt
foreign import ccall "SDL.h SDL_GetNumTouchFingers" getNumTouchFingers' :: TouchID -> IO CInt
foreign import ccall "SDL.h SDL_GetTouchDevice" getTouchDevice' :: CInt -> IO TouchID
foreign import ccall "SDL.h SDL_GetTouchFinger" getTouchFinger' :: TouchID -> CInt -> IO (Ptr Finger)
foreign import ccall "SDL.h SDL_HasEvent" hasEvent' :: Word32 -> IO Bool
foreign import ccall "SDL.h SDL_HasEvents" hasEvents' :: Word32 -> Word32 -> IO Bool
foreign import ccall "SDL.h SDL_LoadDollarTemplates" loadDollarTemplates' :: TouchID -> Ptr RWops -> IO CInt
foreign import ccall "SDL.h SDL_PeepEvents" peepEvents' :: Ptr Event -> CInt -> EventAction -> Word32 -> Word32 -> IO CInt
foreign import ccall "SDL.h SDL_PollEvent" pollEvent' :: Ptr Event -> IO CInt
foreign import ccall "SDL.h SDL_PumpEvents" pumpEvents' :: IO ()
foreign import ccall "SDL.h SDL_PushEvent" pushEvent' :: Ptr Event -> IO CInt
foreign import ccall "SDL.h SDL_RecordGesture" recordGesture' :: TouchID -> IO CInt
foreign import ccall "SDL.h SDL_RegisterEvents" registerEvents' :: CInt -> IO Word32
foreign import ccall "SDL.h SDL_SaveAllDollarTemplates" saveAllDollarTemplates' :: Ptr RWops -> IO CInt
foreign import ccall "SDL.h SDL_SaveDollarTemplate" saveDollarTemplate' :: GestureID -> Ptr RWops -> IO CInt
foreign import ccall "SDL.h SDL_SetEventFilter" setEventFilter' :: EventFilter -> Ptr () -> IO ()
foreign import ccall "SDL.h SDL_WaitEvent" waitEvent' :: Ptr Event -> IO CInt
foreign import ccall "SDL.h SDL_WaitEventTimeout" waitEventTimeout' :: Ptr Event -> CInt -> IO CInt
foreign import ccall "SDL.h SDL_GetKeyFromName" getKeyFromName' :: CString -> IO Keycode
foreign import ccall "SDL.h SDL_GetKeyFromScancode" getKeyFromScancode' :: Scancode -> IO Keycode
foreign import ccall "SDL.h SDL_GetKeyName" getKeyName' :: Keycode -> IO CString
foreign import ccall "SDL.h SDL_GetKeyboardFocus" getKeyboardFocus' :: IO Window
foreign import ccall "SDL.h SDL_GetKeyboardState" getKeyboardState' :: Ptr CInt -> IO (Ptr Word8)
foreign import ccall "SDL.h SDL_GetModState" getModState' :: IO Keymod
foreign import ccall "SDL.h SDL_GetScancodeFromKey" getScancodeFromKey' :: Keycode -> IO Scancode
foreign import ccall "SDL.h SDL_GetScancodeFromName" getScancodeFromName' :: CString -> IO Scancode
foreign import ccall "SDL.h SDL_GetScancodeName" getScancodeName' :: Scancode -> IO CString
foreign import ccall "SDL.h SDL_HasScreenKeyboardSupport" hasScreenKeyboardSupport' :: IO Bool
foreign import ccall "SDL.h SDL_IsScreenKeyboardShown" isScreenKeyboardShown' :: Window -> IO Bool
foreign import ccall "SDL.h SDL_IsTextInputActive" isTextInputActive' :: IO Bool
foreign import ccall "SDL.h SDL_SetModState" setModState' :: Keymod -> IO ()
foreign import ccall "SDL.h SDL_SetTextInputRect" setTextInputRect' :: Ptr Rect -> IO ()
foreign import ccall "SDL.h SDL_StartTextInput" startTextInput' :: IO ()
foreign import ccall "SDL.h SDL_StopTextInput" stopTextInput' :: IO ()
foreign import ccall "SDL.h SDL_CreateColorCursor" createColorCursor' :: Ptr Surface -> CInt -> CInt -> IO Cursor
foreign import ccall "SDL.h SDL_CreateCursor" createCursor' :: Ptr Word8 -> Ptr Word8 -> CInt -> CInt -> CInt -> CInt -> IO Cursor
foreign import ccall "SDL.h SDL_CreateSystemCursor" createSystemCursor' :: SystemCursor -> IO Cursor
foreign import ccall "SDL.h SDL_FreeCursor" freeCursor' :: Cursor -> IO ()
foreign import ccall "SDL.h SDL_GetCursor" getCursor' :: IO Cursor
foreign import ccall "SDL.h SDL_GetDefaultCursor" getDefaultCursor' :: IO Cursor
foreign import ccall "SDL.h SDL_GetMouseFocus" getMouseFocus' :: IO Window
foreign import ccall "SDL.h SDL_GetMouseState" getMouseState' :: Ptr CInt -> Ptr CInt -> IO Word32
foreign import ccall "SDL.h SDL_GetRelativeMouseMode" getRelativeMouseMode' :: IO Bool
foreign import ccall "SDL.h SDL_GetRelativeMouseState" getRelativeMouseState' :: Ptr CInt -> Ptr CInt -> IO Word32
foreign import ccall "SDL.h SDL_SetCursor" setCursor' :: Cursor -> IO ()
foreign import ccall "SDL.h SDL_SetRelativeMouseMode" setRelativeMouseMode' :: Bool -> IO CInt
foreign import ccall "SDL.h SDL_ShowCursor" showCursor' :: CInt -> IO CInt
foreign import ccall "SDL.h SDL_WarpMouseInWindow" warpMouseInWindow' :: Window -> CInt -> CInt -> IO ()
foreign import ccall "SDL.h SDL_JoystickClose" joystickClose' :: Joystick -> IO ()
foreign import ccall "SDL.h SDL_JoystickEventState" joystickEventState' :: CInt -> IO CInt
foreign import ccall "SDL.h SDL_JoystickGetAttached" joystickGetAttached' :: Joystick -> IO Bool
foreign import ccall "SDL.h SDL_JoystickGetAxis" joystickGetAxis' :: Joystick -> CInt -> IO Int16
foreign import ccall "SDL.h SDL_JoystickGetBall" joystickGetBall' :: Joystick -> CInt -> Ptr CInt -> Ptr CInt -> IO CInt
foreign import ccall "SDL.h SDL_JoystickGetButton" joystickGetButton' :: Joystick -> CInt -> IO Word8
foreign import ccall "sdlhelper.h SDLHelper_JoystickGetDeviceGUID" joystickGetDeviceGUID' :: CInt -> Ptr JoystickGUID -> IO ()
foreign import ccall "sdlhelper.h SDLHelper_JoystickGetGUID" joystickGetGUID' :: Joystick -> Ptr JoystickGUID -> IO ()
foreign import ccall "sdlhelper.h SDLHelper_JoystickGetGUIDFromString" joystickGetGUIDFromString' :: CString -> Ptr JoystickGUID -> IO ()
foreign import ccall "sdlhelper.h SDLHelper_JoystickGetGUIDString" joystickGetGUIDString' :: Ptr JoystickGUID -> CString -> CInt -> IO ()
foreign import ccall "SDL.h SDL_JoystickGetHat" joystickGetHat' :: Joystick -> CInt -> IO Word8
foreign import ccall "SDL.h SDL_JoystickInstanceID" joystickInstanceID' :: Joystick -> IO JoystickID
foreign import ccall "SDL.h SDL_JoystickName" joystickName' :: Joystick -> IO CString
foreign import ccall "SDL.h SDL_JoystickNameForIndex" joystickNameForIndex' :: CInt -> IO CString
foreign import ccall "SDL.h SDL_JoystickNumAxes" joystickNumAxes' :: Joystick -> IO CInt
foreign import ccall "SDL.h SDL_JoystickNumBalls" joystickNumBalls' :: Joystick -> IO CInt
foreign import ccall "SDL.h SDL_JoystickNumButtons" joystickNumButtons' :: Joystick -> IO CInt
foreign import ccall "SDL.h SDL_JoystickNumHats" joystickNumHats' :: Joystick -> IO CInt
foreign import ccall "SDL.h SDL_JoystickOpen" joystickOpen' :: CInt -> IO Joystick
foreign import ccall "SDL.h SDL_JoystickUpdate" joystickUpdate' :: IO ()
foreign import ccall "SDL.h SDL_NumJoysticks" numJoysticks' :: IO CInt
foreign import ccall "SDL.h SDL_GameControllerAddMapping" gameControllerAddMapping' :: CString -> IO CInt
foreign import ccall "SDL.h SDL_GameControllerAddMappingsFromRW" gameControllerAddMappingsFromRW' :: Ptr RWops -> CInt -> IO CInt
foreign import ccall "SDL.h SDL_GameControllerClose" gameControllerClose' :: GameController -> IO ()
foreign import ccall "SDL.h SDL_GameControllerEventState" gameControllerEventState' :: CInt -> IO CInt
foreign import ccall "SDL.h SDL_GameControllerGetAttached" gameControllerGetAttached' :: GameController -> IO Bool
foreign import ccall "SDL.h SDL_GameControllerGetAxis" gameControllerGetAxis' :: GameController -> GameControllerAxis -> IO Int16
foreign import ccall "SDL.h SDL_GameControllerGetAxisFromString" gameControllerGetAxisFromString' :: CString -> IO GameControllerAxis
foreign import ccall "sdlhelper.h SDLHelper_GameControllerGetBindForAxis" gameControllerGetBindForAxis' :: GameController -> GameControllerAxis -> Ptr GameControllerButtonBind -> IO ()
foreign import ccall "sdlhelper.h SDLHelper_GameControllerGetBindForButton" gameControllerGetBindForButton' :: GameController -> GameControllerButton -> Ptr GameControllerButtonBind -> IO ()
foreign import ccall "SDL.h SDL_GameControllerGetButton" gameControllerGetButton' :: GameController -> GameControllerButton -> IO Word8
foreign import ccall "SDL.h SDL_GameControllerGetButtonFromString" gameControllerGetButtonFromString' :: CString -> IO GameControllerButton
foreign import ccall "SDL.h SDL_GameControllerGetJoystick" gameControllerGetJoystick' :: GameController -> IO Joystick
foreign import ccall "SDL.h SDL_GameControllerGetStringForAxis" gameControllerGetStringForAxis' :: GameControllerAxis -> IO CString
foreign import ccall "SDL.h SDL_GameControllerGetStringForButton" gameControllerGetStringForButton' :: GameControllerButton -> IO CString
foreign import ccall "SDL.h SDL_GameControllerMapping" gameControllerMapping' :: GameController -> IO CString
foreign import ccall "sdlhelper.h SDLHelper_GameControllerMappingForGUID" gameControllerMappingForGUID' :: Ptr JoystickGUID -> IO CString
foreign import ccall "SDL.h SDL_GameControllerName" gameControllerName' :: GameController -> IO CString
foreign import ccall "SDL.h SDL_GameControllerNameForIndex" gameControllerNameForIndex' :: CInt -> IO CString
foreign import ccall "SDL.h SDL_GameControllerOpen" gameControllerOpen' :: CInt -> IO GameController
foreign import ccall "SDL.h SDL_GameControllerUpdate" gameControllerUpdate' :: IO ()
foreign import ccall "SDL.h SDL_IsGameController" isGameController' :: CInt -> IO Bool
addEventWatch :: MonadIO m => EventFilter -> Ptr () -> m ()
addEventWatch v1 v2 = liftIO $ addEventWatch' v1 v2
delEventWatch :: MonadIO m => EventFilter -> Ptr () -> m ()
delEventWatch v1 v2 = liftIO $ delEventWatch' v1 v2
eventState :: MonadIO m => Word32 -> CInt -> m Word8
eventState v1 v2 = liftIO $ eventState' v1 v2
filterEvents :: MonadIO m => EventFilter -> Ptr () -> m ()
filterEvents v1 v2 = liftIO $ filterEvents' v1 v2
flushEvent :: MonadIO m => Word32 -> m ()
flushEvent v1 = liftIO $ flushEvent' v1
flushEvents :: MonadIO m => Word32 -> Word32 -> m ()
flushEvents v1 v2 = liftIO $ flushEvents' v1 v2
getEventFilter :: MonadIO m => Ptr EventFilter -> Ptr (Ptr ()) -> m Bool
getEventFilter v1 v2 = liftIO $ getEventFilter' v1 v2
getNumTouchDevices :: MonadIO m => m CInt
getNumTouchDevices = liftIO getNumTouchDevices'
getNumTouchFingers :: MonadIO m => TouchID -> m CInt
getNumTouchFingers v1 = liftIO $ getNumTouchFingers' v1
getTouchDevice :: MonadIO m => CInt -> m TouchID
getTouchDevice v1 = liftIO $ getTouchDevice' v1
getTouchFinger :: MonadIO m => TouchID -> CInt -> m (Ptr Finger)
getTouchFinger v1 v2 = liftIO $ getTouchFinger' v1 v2
hasEvent :: MonadIO m => Word32 -> m Bool
hasEvent v1 = liftIO $ hasEvent' v1
hasEvents :: MonadIO m => Word32 -> Word32 -> m Bool
hasEvents v1 v2 = liftIO $ hasEvents' v1 v2
loadDollarTemplates :: MonadIO m => TouchID -> Ptr RWops -> m CInt
loadDollarTemplates v1 v2 = liftIO $ loadDollarTemplates' v1 v2
peepEvents :: MonadIO m => Ptr Event -> CInt -> EventAction -> Word32 -> Word32 -> m CInt
peepEvents v1 v2 v3 v4 v5 = liftIO $ peepEvents' v1 v2 v3 v4 v5
pollEvent :: MonadIO m => Ptr Event -> m CInt
pollEvent v1 = liftIO $ pollEvent' v1
pumpEvents :: MonadIO m => m ()
pumpEvents = liftIO pumpEvents'
pushEvent :: MonadIO m => Ptr Event -> m CInt
pushEvent v1 = liftIO $ pushEvent' v1
quitRequested :: MonadIO m => m Bool
quitRequested = liftIO $ do
pumpEvents
ev <- peepEvents nullPtr 0 SDL_PEEKEVENT SDL_QUIT SDL_QUIT
return $ ev > 0
recordGesture :: MonadIO m => TouchID -> m CInt
recordGesture v1 = liftIO $ recordGesture' v1
registerEvents :: MonadIO m => CInt -> m Word32
registerEvents v1 = liftIO $ registerEvents' v1
saveAllDollarTemplates :: MonadIO m => Ptr RWops -> m CInt
saveAllDollarTemplates v1 = liftIO $ saveAllDollarTemplates' v1
saveDollarTemplate :: MonadIO m => GestureID -> Ptr RWops -> m CInt
saveDollarTemplate v1 v2 = liftIO $ saveDollarTemplate' v1 v2
setEventFilter :: MonadIO m => EventFilter -> Ptr () -> m ()
setEventFilter v1 v2 = liftIO $ setEventFilter' v1 v2
waitEvent :: MonadIO m => Ptr Event -> m CInt
waitEvent v1 = liftIO $ waitEvent' v1
waitEventTimeout :: MonadIO m => Ptr Event -> CInt -> m CInt
waitEventTimeout v1 v2 = liftIO $ waitEventTimeout' v1 v2
getKeyFromName :: MonadIO m => CString -> m Keycode
getKeyFromName v1 = liftIO $ getKeyFromName' v1
getKeyFromScancode :: MonadIO m => Scancode -> m Keycode
getKeyFromScancode v1 = liftIO $ getKeyFromScancode' v1
getKeyName :: MonadIO m => Keycode -> m CString
getKeyName v1 = liftIO $ getKeyName' v1
getKeyboardFocus :: MonadIO m => m Window
getKeyboardFocus = liftIO getKeyboardFocus'
getKeyboardState :: MonadIO m => Ptr CInt -> m (Ptr Word8)
getKeyboardState v1 = liftIO $ getKeyboardState' v1
getModState :: MonadIO m => m Keymod
getModState = liftIO getModState'
getScancodeFromKey :: MonadIO m => Keycode -> m Scancode
getScancodeFromKey v1 = liftIO $ getScancodeFromKey' v1
getScancodeFromName :: MonadIO m => CString -> m Scancode
getScancodeFromName v1 = liftIO $ getScancodeFromName' v1
getScancodeName :: MonadIO m => Scancode -> m CString
getScancodeName v1 = liftIO $ getScancodeName' v1
hasScreenKeyboardSupport :: MonadIO m => m Bool
hasScreenKeyboardSupport = liftIO hasScreenKeyboardSupport'
isScreenKeyboardShown :: MonadIO m => Window -> m Bool
isScreenKeyboardShown v1 = liftIO $ isScreenKeyboardShown' v1
isTextInputActive :: MonadIO m => m Bool
isTextInputActive = liftIO isTextInputActive'
setModState :: MonadIO m => Keymod -> m ()
setModState v1 = liftIO $ setModState' v1
setTextInputRect :: MonadIO m => Ptr Rect -> m ()
setTextInputRect v1 = liftIO $ setTextInputRect' v1
startTextInput :: MonadIO m => m ()
startTextInput = liftIO startTextInput'
stopTextInput :: MonadIO m => m ()
stopTextInput = liftIO stopTextInput'
createColorCursor :: MonadIO m => Ptr Surface -> CInt -> CInt -> m Cursor
createColorCursor v1 v2 v3 = liftIO $ createColorCursor' v1 v2 v3
createCursor :: MonadIO m => Ptr Word8 -> Ptr Word8 -> CInt -> CInt -> CInt -> CInt -> m Cursor
createCursor v1 v2 v3 v4 v5 v6 = liftIO $ createCursor' v1 v2 v3 v4 v5 v6
createSystemCursor :: MonadIO m => SystemCursor -> m Cursor
createSystemCursor v1 = liftIO $ createSystemCursor' v1
freeCursor :: MonadIO m => Cursor -> m ()
freeCursor v1 = liftIO $ freeCursor' v1
getCursor :: MonadIO m => m Cursor
getCursor = liftIO getCursor'
getDefaultCursor :: MonadIO m => m Cursor
getDefaultCursor = liftIO getDefaultCursor'
getMouseFocus :: MonadIO m => m Window
getMouseFocus = liftIO getMouseFocus'
getMouseState :: MonadIO m => Ptr CInt -> Ptr CInt -> m Word32
getMouseState v1 v2 = liftIO $ getMouseState' v1 v2
getRelativeMouseMode :: MonadIO m => m Bool
getRelativeMouseMode = liftIO getRelativeMouseMode'
getRelativeMouseState :: MonadIO m => Ptr CInt -> Ptr CInt -> m Word32
getRelativeMouseState v1 v2 = liftIO $ getRelativeMouseState' v1 v2
setCursor :: MonadIO m => Cursor -> m ()
setCursor v1 = liftIO $ setCursor' v1
setRelativeMouseMode :: MonadIO m => Bool -> m CInt
setRelativeMouseMode v1 = liftIO $ setRelativeMouseMode' v1
showCursor :: MonadIO m => CInt -> m CInt
showCursor v1 = liftIO $ showCursor' v1
warpMouseInWindow :: MonadIO m => Window -> CInt -> CInt -> m ()
warpMouseInWindow v1 v2 v3 = liftIO $ warpMouseInWindow' v1 v2 v3
joystickClose :: MonadIO m => Joystick -> m ()
joystickClose v1 = liftIO $ joystickClose' v1
joystickEventState :: MonadIO m => CInt -> m CInt
joystickEventState v1 = liftIO $ joystickEventState' v1
joystickGetAttached :: MonadIO m => Joystick -> m Bool
joystickGetAttached v1 = liftIO $ joystickGetAttached' v1
joystickGetAxis :: MonadIO m => Joystick -> CInt -> m Int16
joystickGetAxis v1 v2 = liftIO $ joystickGetAxis' v1 v2
joystickGetBall :: MonadIO m => Joystick -> CInt -> Ptr CInt -> Ptr CInt -> m CInt
joystickGetBall v1 v2 v3 v4 = liftIO $ joystickGetBall' v1 v2 v3 v4
joystickGetButton :: MonadIO m => Joystick -> CInt -> m Word8
joystickGetButton v1 v2 = liftIO $ joystickGetButton' v1 v2
joystickGetDeviceGUID :: MonadIO m => CInt -> m JoystickGUID
joystickGetDeviceGUID device_index = liftIO . alloca $ \ptr -> do
joystickGetDeviceGUID' device_index ptr
peek ptr
joystickGetGUID :: MonadIO m => Joystick -> m JoystickGUID
joystickGetGUID joystick = liftIO . alloca $ \ptr -> do
joystickGetGUID' joystick ptr
peek ptr
joystickGetGUIDFromString :: MonadIO m => CString -> m JoystickGUID
joystickGetGUIDFromString pchGUID = liftIO . alloca $ \ptr -> do
joystickGetGUIDFromString' pchGUID ptr
peek ptr
joystickGetGUIDString :: MonadIO m => JoystickGUID -> CString -> CInt -> m ()
joystickGetGUIDString guid pszGUID cbGUID = liftIO . alloca $ \ptr -> do
poke ptr guid
joystickGetGUIDString' ptr pszGUID cbGUID
joystickGetHat :: MonadIO m => Joystick -> CInt -> m Word8
joystickGetHat v1 v2 = liftIO $ joystickGetHat' v1 v2
joystickInstanceID :: MonadIO m => Joystick -> m JoystickID
joystickInstanceID v1 = liftIO $ joystickInstanceID' v1
joystickName :: MonadIO m => Joystick -> m CString
joystickName v1 = liftIO $ joystickName' v1
joystickNameForIndex :: MonadIO m => CInt -> m CString
joystickNameForIndex v1 = liftIO $ joystickNameForIndex' v1
joystickNumAxes :: MonadIO m => Joystick -> m CInt
joystickNumAxes v1 = liftIO $ joystickNumAxes' v1
joystickNumBalls :: MonadIO m => Joystick -> m CInt
joystickNumBalls v1 = liftIO $ joystickNumBalls' v1
joystickNumButtons :: MonadIO m => Joystick -> m CInt
joystickNumButtons v1 = liftIO $ joystickNumButtons' v1
joystickNumHats :: MonadIO m => Joystick -> m CInt
joystickNumHats v1 = liftIO $ joystickNumHats' v1
joystickOpen :: MonadIO m => CInt -> m Joystick
joystickOpen v1 = liftIO $ joystickOpen' v1
joystickUpdate :: MonadIO m => m ()
joystickUpdate = liftIO joystickUpdate'
numJoysticks :: MonadIO m => m CInt
numJoysticks = liftIO numJoysticks'
gameControllerAddMapping :: MonadIO m => CString -> m CInt
gameControllerAddMapping v1 = liftIO $ gameControllerAddMapping' v1
gameControllerAddMappingsFromFile :: MonadIO m => CString -> m CInt
gameControllerAddMappingsFromFile file = liftIO $ do
rw <- withCString "rb" $ rwFromFile file
gameControllerAddMappingsFromRW rw 1
gameControllerAddMappingsFromRW :: MonadIO m => Ptr RWops -> CInt -> m CInt
gameControllerAddMappingsFromRW v1 v2 = liftIO $ gameControllerAddMappingsFromRW' v1 v2
gameControllerClose :: MonadIO m => GameController -> m ()
gameControllerClose v1 = liftIO $ gameControllerClose' v1
gameControllerEventState :: MonadIO m => CInt -> m CInt
gameControllerEventState v1 = liftIO $ gameControllerEventState' v1
gameControllerGetAttached :: MonadIO m => GameController -> m Bool
gameControllerGetAttached v1 = liftIO $ gameControllerGetAttached' v1
gameControllerGetAxis :: MonadIO m => GameController -> GameControllerAxis -> m Int16
gameControllerGetAxis v1 v2 = liftIO $ gameControllerGetAxis' v1 v2
gameControllerGetAxisFromString :: MonadIO m => CString -> m GameControllerAxis
gameControllerGetAxisFromString v1 = liftIO $ gameControllerGetAxisFromString' v1
gameControllerGetBindForAxis :: MonadIO m => GameController -> GameControllerAxis -> m GameControllerButtonBind
gameControllerGetBindForAxis gamecontroller axis = liftIO . alloca $ \ptr -> do
gameControllerGetBindForAxis' gamecontroller axis ptr
peek ptr
gameControllerGetBindForButton :: MonadIO m => GameController -> GameControllerButton -> m GameControllerButtonBind
gameControllerGetBindForButton gamecontroller button = liftIO . alloca $ \ptr -> do
gameControllerGetBindForButton' gamecontroller button ptr
peek ptr
gameControllerGetButton :: MonadIO m => GameController -> GameControllerButton -> m Word8
gameControllerGetButton v1 v2 = liftIO $ gameControllerGetButton' v1 v2
gameControllerGetButtonFromString :: MonadIO m => CString -> m GameControllerButton
gameControllerGetButtonFromString v1 = liftIO $ gameControllerGetButtonFromString' v1
gameControllerGetJoystick :: MonadIO m => GameController -> m Joystick
gameControllerGetJoystick v1 = liftIO $ gameControllerGetJoystick' v1
gameControllerGetStringForAxis :: MonadIO m => GameControllerAxis -> m CString
gameControllerGetStringForAxis v1 = liftIO $ gameControllerGetStringForAxis' v1
gameControllerGetStringForButton :: MonadIO m => GameControllerButton -> m CString
gameControllerGetStringForButton v1 = liftIO $ gameControllerGetStringForButton' v1
gameControllerMapping :: MonadIO m => GameController -> m CString
gameControllerMapping v1 = liftIO $ gameControllerMapping' v1
gameControllerMappingForGUID :: MonadIO m => JoystickGUID -> m CString
gameControllerMappingForGUID guid = liftIO . alloca $ \ptr -> do
poke ptr guid
gameControllerMappingForGUID' ptr
gameControllerName :: MonadIO m => GameController -> m CString
gameControllerName v1 = liftIO $ gameControllerName' v1
gameControllerNameForIndex :: MonadIO m => CInt -> m CString
gameControllerNameForIndex v1 = liftIO $ gameControllerNameForIndex' v1
gameControllerOpen :: MonadIO m => CInt -> m GameController
gameControllerOpen v1 = liftIO $ gameControllerOpen' v1
gameControllerUpdate :: MonadIO m => m ()
gameControllerUpdate = liftIO gameControllerUpdate'
isGameController :: MonadIO m => CInt -> m Bool
isGameController v1 = liftIO $ isGameController' v1