module SDL.Raw.Haptic (
  -- * Force Feedback Support
  hapticClose,
  hapticDestroyEffect,
  hapticEffectSupported,
  hapticGetEffectStatus,
  hapticIndex,
  hapticName,
  hapticNewEffect,
  hapticNumAxes,
  hapticNumEffects,
  hapticNumEffectsPlaying,
  hapticOpen,
  hapticOpenFromJoystick,
  hapticOpenFromMouse,
  hapticOpened,
  hapticPause,
  hapticQuery,
  hapticRumbleInit,
  hapticRumblePlay,
  hapticRumbleStop,
  hapticRumbleSupported,
  hapticRunEffect,
  hapticSetAutocenter,
  hapticSetGain,
  hapticStopAll,
  hapticStopEffect,
  hapticUnpause,
  hapticUpdateEffect,
  joystickIsHaptic,
  mouseIsHaptic,
  numHaptics
) where

import Control.Monad.IO.Class
import Data.Word
import Foreign.C.String
import Foreign.C.Types
import Foreign.Ptr
import SDL.Raw.Types

foreign import ccall "SDL.h SDL_HapticClose" hapticCloseFFI :: Haptic -> IO ()
foreign import ccall "SDL.h SDL_HapticDestroyEffect" hapticDestroyEffectFFI :: Haptic -> CInt -> IO ()
foreign import ccall "SDL.h SDL_HapticEffectSupported" hapticEffectSupportedFFI :: Haptic -> Ptr HapticEffect -> IO CInt
foreign import ccall "SDL.h SDL_HapticGetEffectStatus" hapticGetEffectStatusFFI :: Haptic -> CInt -> IO CInt
foreign import ccall "SDL.h SDL_HapticIndex" hapticIndexFFI :: Haptic -> IO CInt
foreign import ccall "SDL.h SDL_HapticName" hapticNameFFI :: CInt -> IO CString
foreign import ccall "SDL.h SDL_HapticNewEffect" hapticNewEffectFFI :: Haptic -> Ptr HapticEffect -> IO CInt
foreign import ccall "SDL.h SDL_HapticNumAxes" hapticNumAxesFFI :: Haptic -> IO CInt
foreign import ccall "SDL.h SDL_HapticNumEffects" hapticNumEffectsFFI :: Haptic -> IO CInt
foreign import ccall "SDL.h SDL_HapticNumEffectsPlaying" hapticNumEffectsPlayingFFI :: Haptic -> IO CInt
foreign import ccall "SDL.h SDL_HapticOpen" hapticOpenFFI :: CInt -> IO Haptic
foreign import ccall "SDL.h SDL_HapticOpenFromJoystick" hapticOpenFromJoystickFFI :: Joystick -> IO Haptic
foreign import ccall "SDL.h SDL_HapticOpenFromMouse" hapticOpenFromMouseFFI :: IO Haptic
foreign import ccall "SDL.h SDL_HapticOpened" hapticOpenedFFI :: CInt -> IO CInt
foreign import ccall "SDL.h SDL_HapticPause" hapticPauseFFI :: Haptic -> IO CInt
foreign import ccall "SDL.h SDL_HapticQuery" hapticQueryFFI :: Haptic -> IO CUInt
foreign import ccall "SDL.h SDL_HapticRumbleInit" hapticRumbleInitFFI :: Haptic -> IO CInt
foreign import ccall "SDL.h SDL_HapticRumblePlay" hapticRumblePlayFFI :: Haptic -> CFloat -> Word32 -> IO CInt
foreign import ccall "SDL.h SDL_HapticRumbleStop" hapticRumbleStopFFI :: Haptic -> IO CInt
foreign import ccall "SDL.h SDL_HapticRumbleSupported" hapticRumbleSupportedFFI :: Haptic -> IO CInt
foreign import ccall "SDL.h SDL_HapticRunEffect" hapticRunEffectFFI :: Haptic -> CInt -> Word32 -> IO CInt
foreign import ccall "SDL.h SDL_HapticSetAutocenter" hapticSetAutocenterFFI :: Haptic -> CInt -> IO CInt
foreign import ccall "SDL.h SDL_HapticSetGain" hapticSetGainFFI :: Haptic -> CInt -> IO CInt
foreign import ccall "SDL.h SDL_HapticStopAll" hapticStopAllFFI :: Haptic -> IO CInt
foreign import ccall "SDL.h SDL_HapticStopEffect" hapticStopEffectFFI :: Haptic -> CInt -> IO CInt
foreign import ccall "SDL.h SDL_HapticUnpause" hapticUnpauseFFI :: Haptic -> IO CInt
foreign import ccall "SDL.h SDL_HapticUpdateEffect" hapticUpdateEffectFFI :: Haptic -> CInt -> Ptr HapticEffect -> IO CInt
foreign import ccall "SDL.h SDL_JoystickIsHaptic" joystickIsHapticFFI :: Joystick -> IO CInt
foreign import ccall "SDL.h SDL_MouseIsHaptic" mouseIsHapticFFI :: IO CInt
foreign import ccall "SDL.h SDL_NumHaptics" numHapticsFFI :: IO CInt

hapticClose :: MonadIO m => Haptic -> m ()
hapticClose :: forall (m :: Type -> Type). MonadIO m => Haptic -> m ()
hapticClose Haptic
v1 = forall (m :: Type -> Type) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ Haptic -> IO ()
hapticCloseFFI Haptic
v1
{-# INLINE hapticClose #-}

hapticDestroyEffect :: MonadIO m => Haptic -> CInt -> m ()
hapticDestroyEffect :: forall (m :: Type -> Type). MonadIO m => Haptic -> CInt -> m ()
hapticDestroyEffect Haptic
v1 CInt
v2 = forall (m :: Type -> Type) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ Haptic -> CInt -> IO ()
hapticDestroyEffectFFI Haptic
v1 CInt
v2
{-# INLINE hapticDestroyEffect #-}

hapticEffectSupported :: MonadIO m => Haptic -> Ptr HapticEffect -> m CInt
hapticEffectSupported :: forall (m :: Type -> Type).
MonadIO m =>
Haptic -> Ptr HapticEffect -> m CInt
hapticEffectSupported Haptic
v1 Ptr HapticEffect
v2 = forall (m :: Type -> Type) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ Haptic -> Ptr HapticEffect -> IO CInt
hapticEffectSupportedFFI Haptic
v1 Ptr HapticEffect
v2
{-# INLINE hapticEffectSupported #-}

hapticGetEffectStatus :: MonadIO m => Haptic -> CInt -> m CInt
hapticGetEffectStatus :: forall (m :: Type -> Type). MonadIO m => Haptic -> CInt -> m CInt
hapticGetEffectStatus Haptic
v1 CInt
v2 = forall (m :: Type -> Type) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ Haptic -> CInt -> IO CInt
hapticGetEffectStatusFFI Haptic
v1 CInt
v2
{-# INLINE hapticGetEffectStatus #-}

hapticIndex :: MonadIO m => Haptic -> m CInt
hapticIndex :: forall (m :: Type -> Type). MonadIO m => Haptic -> m CInt
hapticIndex Haptic
v1 = forall (m :: Type -> Type) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ Haptic -> IO CInt
hapticIndexFFI Haptic
v1
{-# INLINE hapticIndex #-}

hapticName :: MonadIO m => CInt -> m CString
hapticName :: forall (m :: Type -> Type). MonadIO m => CInt -> m CString
hapticName CInt
v1 = forall (m :: Type -> Type) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ CInt -> IO CString
hapticNameFFI CInt
v1
{-# INLINE hapticName #-}

hapticNewEffect :: MonadIO m => Haptic -> Ptr HapticEffect -> m CInt
hapticNewEffect :: forall (m :: Type -> Type).
MonadIO m =>
Haptic -> Ptr HapticEffect -> m CInt
hapticNewEffect Haptic
v1 Ptr HapticEffect
v2 = forall (m :: Type -> Type) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ Haptic -> Ptr HapticEffect -> IO CInt
hapticNewEffectFFI Haptic
v1 Ptr HapticEffect
v2
{-# INLINE hapticNewEffect #-}

hapticNumAxes :: MonadIO m => Haptic -> m CInt
hapticNumAxes :: forall (m :: Type -> Type). MonadIO m => Haptic -> m CInt
hapticNumAxes Haptic
v1 = forall (m :: Type -> Type) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ Haptic -> IO CInt
hapticNumAxesFFI Haptic
v1
{-# INLINE hapticNumAxes #-}

hapticNumEffects :: MonadIO m => Haptic -> m CInt
hapticNumEffects :: forall (m :: Type -> Type). MonadIO m => Haptic -> m CInt
hapticNumEffects Haptic
v1 = forall (m :: Type -> Type) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ Haptic -> IO CInt
hapticNumEffectsFFI Haptic
v1
{-# INLINE hapticNumEffects #-}

hapticNumEffectsPlaying :: MonadIO m => Haptic -> m CInt
hapticNumEffectsPlaying :: forall (m :: Type -> Type). MonadIO m => Haptic -> m CInt
hapticNumEffectsPlaying Haptic
v1 = forall (m :: Type -> Type) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ Haptic -> IO CInt
hapticNumEffectsPlayingFFI Haptic
v1
{-# INLINE hapticNumEffectsPlaying #-}

hapticOpen :: MonadIO m => CInt -> m Haptic
hapticOpen :: forall (m :: Type -> Type). MonadIO m => CInt -> m Haptic
hapticOpen CInt
v1 = forall (m :: Type -> Type) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ CInt -> IO Haptic
hapticOpenFFI CInt
v1
{-# INLINE hapticOpen #-}

hapticOpenFromJoystick :: MonadIO m => Joystick -> m Haptic
hapticOpenFromJoystick :: forall (m :: Type -> Type). MonadIO m => Haptic -> m Haptic
hapticOpenFromJoystick Haptic
v1 = forall (m :: Type -> Type) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ Haptic -> IO Haptic
hapticOpenFromJoystickFFI Haptic
v1
{-# INLINE hapticOpenFromJoystick #-}

hapticOpenFromMouse :: MonadIO m => m Haptic
hapticOpenFromMouse :: forall (m :: Type -> Type). MonadIO m => m Haptic
hapticOpenFromMouse = forall (m :: Type -> Type) a. MonadIO m => IO a -> m a
liftIO IO Haptic
hapticOpenFromMouseFFI
{-# INLINE hapticOpenFromMouse #-}

hapticOpened :: MonadIO m => CInt -> m CInt
hapticOpened :: forall (m :: Type -> Type). MonadIO m => CInt -> m CInt
hapticOpened CInt
v1 = forall (m :: Type -> Type) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ CInt -> IO CInt
hapticOpenedFFI CInt
v1
{-# INLINE hapticOpened #-}

hapticPause :: MonadIO m => Haptic -> m CInt
hapticPause :: forall (m :: Type -> Type). MonadIO m => Haptic -> m CInt
hapticPause Haptic
v1 = forall (m :: Type -> Type) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ Haptic -> IO CInt
hapticPauseFFI Haptic
v1
{-# INLINE hapticPause #-}

hapticQuery :: MonadIO m => Haptic -> m CUInt
hapticQuery :: forall (m :: Type -> Type). MonadIO m => Haptic -> m CUInt
hapticQuery Haptic
v1 = forall (m :: Type -> Type) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ Haptic -> IO CUInt
hapticQueryFFI Haptic
v1
{-# INLINE hapticQuery #-}

hapticRumbleInit :: MonadIO m => Haptic -> m CInt
hapticRumbleInit :: forall (m :: Type -> Type). MonadIO m => Haptic -> m CInt
hapticRumbleInit Haptic
v1 = forall (m :: Type -> Type) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ Haptic -> IO CInt
hapticRumbleInitFFI Haptic
v1
{-# INLINE hapticRumbleInit #-}

hapticRumblePlay :: MonadIO m => Haptic -> CFloat -> Word32 -> m CInt
hapticRumblePlay :: forall (m :: Type -> Type).
MonadIO m =>
Haptic -> CFloat -> Word32 -> m CInt
hapticRumblePlay Haptic
v1 CFloat
v2 Word32
v3 = forall (m :: Type -> Type) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ Haptic -> CFloat -> Word32 -> IO CInt
hapticRumblePlayFFI Haptic
v1 CFloat
v2 Word32
v3
{-# INLINE hapticRumblePlay #-}

hapticRumbleStop :: MonadIO m => Haptic -> m CInt
hapticRumbleStop :: forall (m :: Type -> Type). MonadIO m => Haptic -> m CInt
hapticRumbleStop Haptic
v1 = forall (m :: Type -> Type) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ Haptic -> IO CInt
hapticRumbleStopFFI Haptic
v1
{-# INLINE hapticRumbleStop #-}

hapticRumbleSupported :: MonadIO m => Haptic -> m CInt
hapticRumbleSupported :: forall (m :: Type -> Type). MonadIO m => Haptic -> m CInt
hapticRumbleSupported Haptic
v1 = forall (m :: Type -> Type) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ Haptic -> IO CInt
hapticRumbleSupportedFFI Haptic
v1
{-# INLINE hapticRumbleSupported #-}

hapticRunEffect :: MonadIO m => Haptic -> CInt -> Word32 -> m CInt
hapticRunEffect :: forall (m :: Type -> Type).
MonadIO m =>
Haptic -> CInt -> Word32 -> m CInt
hapticRunEffect Haptic
v1 CInt
v2 Word32
v3 = forall (m :: Type -> Type) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ Haptic -> CInt -> Word32 -> IO CInt
hapticRunEffectFFI Haptic
v1 CInt
v2 Word32
v3
{-# INLINE hapticRunEffect #-}

hapticSetAutocenter :: MonadIO m => Haptic -> CInt -> m CInt
hapticSetAutocenter :: forall (m :: Type -> Type). MonadIO m => Haptic -> CInt -> m CInt
hapticSetAutocenter Haptic
v1 CInt
v2 = forall (m :: Type -> Type) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ Haptic -> CInt -> IO CInt
hapticSetAutocenterFFI Haptic
v1 CInt
v2
{-# INLINE hapticSetAutocenter #-}

hapticSetGain :: MonadIO m => Haptic -> CInt -> m CInt
hapticSetGain :: forall (m :: Type -> Type). MonadIO m => Haptic -> CInt -> m CInt
hapticSetGain Haptic
v1 CInt
v2 = forall (m :: Type -> Type) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ Haptic -> CInt -> IO CInt
hapticSetGainFFI Haptic
v1 CInt
v2
{-# INLINE hapticSetGain #-}

hapticStopAll :: MonadIO m => Haptic -> m CInt
hapticStopAll :: forall (m :: Type -> Type). MonadIO m => Haptic -> m CInt
hapticStopAll Haptic
v1 = forall (m :: Type -> Type) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ Haptic -> IO CInt
hapticStopAllFFI Haptic
v1
{-# INLINE hapticStopAll #-}

hapticStopEffect :: MonadIO m => Haptic -> CInt -> m CInt
hapticStopEffect :: forall (m :: Type -> Type). MonadIO m => Haptic -> CInt -> m CInt
hapticStopEffect Haptic
v1 CInt
v2 = forall (m :: Type -> Type) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ Haptic -> CInt -> IO CInt
hapticStopEffectFFI Haptic
v1 CInt
v2
{-# INLINE hapticStopEffect #-}

hapticUnpause :: MonadIO m => Haptic -> m CInt
hapticUnpause :: forall (m :: Type -> Type). MonadIO m => Haptic -> m CInt
hapticUnpause Haptic
v1 = forall (m :: Type -> Type) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ Haptic -> IO CInt
hapticUnpauseFFI Haptic
v1
{-# INLINE hapticUnpause #-}

hapticUpdateEffect :: MonadIO m => Haptic -> CInt -> Ptr HapticEffect -> m CInt
hapticUpdateEffect :: forall (m :: Type -> Type).
MonadIO m =>
Haptic -> CInt -> Ptr HapticEffect -> m CInt
hapticUpdateEffect Haptic
v1 CInt
v2 Ptr HapticEffect
v3 = forall (m :: Type -> Type) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ Haptic -> CInt -> Ptr HapticEffect -> IO CInt
hapticUpdateEffectFFI Haptic
v1 CInt
v2 Ptr HapticEffect
v3
{-# INLINE hapticUpdateEffect #-}

joystickIsHaptic :: MonadIO m => Joystick -> m CInt
joystickIsHaptic :: forall (m :: Type -> Type). MonadIO m => Haptic -> m CInt
joystickIsHaptic Haptic
v1 = forall (m :: Type -> Type) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ Haptic -> IO CInt
joystickIsHapticFFI Haptic
v1
{-# INLINE joystickIsHaptic #-}

mouseIsHaptic :: MonadIO m => m CInt
mouseIsHaptic :: forall (m :: Type -> Type). MonadIO m => m CInt
mouseIsHaptic = forall (m :: Type -> Type) a. MonadIO m => IO a -> m a
liftIO IO CInt
mouseIsHapticFFI
{-# INLINE mouseIsHaptic #-}

numHaptics :: MonadIO m => m CInt
numHaptics :: forall (m :: Type -> Type). MonadIO m => m CInt
numHaptics = forall (m :: Type -> Type) a. MonadIO m => IO a -> m a
liftIO IO CInt
numHapticsFFI
{-# INLINE numHaptics #-}