module HGamer3D.Bindings.SFML.ClassJoystick where
import Foreign
import Foreign.Ptr
import Foreign.C
import HGamer3D.Data.HG3DClass
import HGamer3D.Data.Vector
import HGamer3D.Data.Colour
import HGamer3D.Data.Angle
import HGamer3D.Bindings.SFML.Utils
import HGamer3D.Bindings.SFML.ClassPtr
import HGamer3D.Bindings.SFML.StructHG3DClass
import HGamer3D.Bindings.SFML.EnumJoystickAxis
isConnected :: Int -> IO (Bool)
isConnected a1 =
let {a1' = fromIntegral a1} in
alloca $ \a2' ->
isConnected'_ a1' a2' >>= \res ->
peekBoolUtil a2'>>= \a2'' ->
return (a2'')
getButtonCount :: Int -> IO (Int)
getButtonCount a1 =
let {a1' = fromIntegral a1} in
alloca $ \a2' ->
getButtonCount'_ a1' a2' >>= \res ->
peekIntConv a2'>>= \a2'' ->
return (a2'')
hasAxis :: Int -> EnumJoystickAxis -> IO (Bool)
hasAxis a1 a2 =
let {a1' = fromIntegral a1} in
let {a2' = cIntFromEnum a2} in
alloca $ \a3' ->
hasAxis'_ a1' a2' a3' >>= \res ->
peekBoolUtil a3'>>= \a3'' ->
return (a3'')
isButtonPressed :: Int -> Int -> IO (Bool)
isButtonPressed a1 a2 =
let {a1' = fromIntegral a1} in
let {a2' = fromIntegral a2} in
alloca $ \a3' ->
isButtonPressed'_ a1' a2' a3' >>= \res ->
peekBoolUtil a3'>>= \a3'' ->
return (a3'')
getAxisPosition :: Int -> EnumJoystickAxis -> IO (Float)
getAxisPosition a1 a2 =
let {a1' = fromIntegral a1} in
let {a2' = cIntFromEnum a2} in
alloca $ \a3' ->
getAxisPosition'_ a1' a2' a3' >>= \res ->
peekFloatConv a3'>>= \a3'' ->
return (a3'')
update :: IO ()
update =
update'_ >>= \res ->
return ()
foreign import ccall safe "HGamer3D\\Bindings\\SFML\\ClassJoystick.chs.h sfml_jst_isConnected"
isConnected'_ :: (CUInt -> ((Ptr CInt) -> (IO ())))
foreign import ccall safe "HGamer3D\\Bindings\\SFML\\ClassJoystick.chs.h sfml_jst_getButtonCount"
getButtonCount'_ :: (CUInt -> ((Ptr CUInt) -> (IO ())))
foreign import ccall safe "HGamer3D\\Bindings\\SFML\\ClassJoystick.chs.h sfml_jst_hasAxis"
hasAxis'_ :: (CUInt -> (CInt -> ((Ptr CInt) -> (IO ()))))
foreign import ccall safe "HGamer3D\\Bindings\\SFML\\ClassJoystick.chs.h sfml_jst_isButtonPressed"
isButtonPressed'_ :: (CUInt -> (CUInt -> ((Ptr CInt) -> (IO ()))))
foreign import ccall safe "HGamer3D\\Bindings\\SFML\\ClassJoystick.chs.h sfml_jst_getAxisPosition"
getAxisPosition'_ :: (CUInt -> (CInt -> ((Ptr CFloat) -> (IO ()))))
foreign import ccall safe "HGamer3D\\Bindings\\SFML\\ClassJoystick.chs.h sfml_jst_update"
update'_ :: (IO ())