{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE NoFieldSelectors #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_HADDOCK prune #-}
module SDL3.Sys.Bindgen.Touch.Unsafe (
SDL3.Sys.Bindgen.Touch.Unsafe.sDL_GetTouchDevices,
SDL3.Sys.Bindgen.Touch.Unsafe.sDL_GetTouchDeviceName,
SDL3.Sys.Bindgen.Touch.Unsafe.sDL_GetTouchDeviceType,
SDL3.Sys.Bindgen.Touch.Unsafe.sDL_GetTouchFingers,
)
where
import Prelude (IO, fmap)
import HsBindgen.Runtime.LibC qualified
import HsBindgen.Runtime.PtrConst qualified as PtrConst
import HsBindgen.Runtime.Support qualified as BG
import HsBindgen.Runtime.Support.CAPI qualified
import SDL3.Sys.Bindgen.Touch
$( HsBindgen.Runtime.Support.CAPI.addCSource
( HsBindgen.Runtime.Support.CAPI.unlines
[ "#define SDL_MAIN_HANDLED"
, "#define SDL_SLOW_MEMCPY"
, "#define SDL_SLOW_MEMMOVE"
, "#define SDL_SLOW_MEMSET"
, "#include <SDL3/SDL_touch.h>"
, "SDL_TouchID *hs_bindgen_adf35ae251419f33 ("
, " signed int *arg1"
, ")"
, "{"
, " return (SDL_GetTouchDevices)(arg1);"
, "}"
, "char const *hs_bindgen_abb682109ef47145 ("
, " SDL_TouchID arg1"
, ")"
, "{"
, " return (SDL_GetTouchDeviceName)(arg1);"
, "}"
, "SDL_TouchDeviceType hs_bindgen_bba2e3647e7dd111 ("
, " SDL_TouchID arg1"
, ")"
, "{"
, " return (SDL_GetTouchDeviceType)(arg1);"
, "}"
, "SDL_Finger **hs_bindgen_645cd3b208b9edce ("
, " SDL_TouchID arg1,"
, " signed int *arg2"
, ")"
, "{"
, " return (SDL_GetTouchFingers)(arg1, arg2);"
, "}"
]
)
)
foreign import ccall unsafe "hs_bindgen_adf35ae251419f33"
hs_bindgen_adf35ae251419f33_base
:: BG.Ptr BG.Void
-> IO (BG.Ptr BG.Void)
hs_bindgen_adf35ae251419f33
:: BG.Ptr BG.CInt
-> IO (BG.Ptr SDL_TouchID)
hs_bindgen_adf35ae251419f33 :: Ptr CInt -> IO (Ptr SDL_TouchID)
hs_bindgen_adf35ae251419f33 =
\Ptr CInt
x0 ->
(Ptr Void -> Ptr SDL_TouchID)
-> IO (Ptr Void) -> IO (Ptr SDL_TouchID)
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Ptr Void -> Ptr SDL_TouchID
FFIType (Ptr SDL_TouchID) -> Ptr SDL_TouchID
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType (Ptr Void -> IO (Ptr Void)
hs_bindgen_adf35ae251419f33_base (Ptr CInt -> FFIType (Ptr CInt)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Ptr CInt
x0))
sDL_GetTouchDevices
:: BG.Ptr BG.CInt
-> IO (BG.Ptr SDL_TouchID)
sDL_GetTouchDevices :: Ptr CInt -> IO (Ptr SDL_TouchID)
sDL_GetTouchDevices = Ptr CInt -> IO (Ptr SDL_TouchID)
hs_bindgen_adf35ae251419f33
foreign import ccall unsafe "hs_bindgen_abb682109ef47145"
hs_bindgen_abb682109ef47145_base
:: HsBindgen.Runtime.LibC.Word64
-> IO (BG.Ptr BG.Void)
hs_bindgen_abb682109ef47145
:: SDL_TouchID
-> IO (PtrConst.PtrConst BG.CChar)
hs_bindgen_abb682109ef47145 :: SDL_TouchID -> IO (PtrConst CChar)
hs_bindgen_abb682109ef47145 =
\SDL_TouchID
x0 ->
(Ptr Void -> PtrConst CChar)
-> IO (Ptr Void) -> IO (PtrConst CChar)
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Ptr Void -> PtrConst CChar
FFIType (PtrConst CChar) -> PtrConst CChar
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType (Word64 -> IO (Ptr Void)
hs_bindgen_abb682109ef47145_base (SDL_TouchID -> FFIType SDL_TouchID
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType SDL_TouchID
x0))
sDL_GetTouchDeviceName
:: SDL_TouchID
-> IO (PtrConst.PtrConst BG.CChar)
sDL_GetTouchDeviceName :: SDL_TouchID -> IO (PtrConst CChar)
sDL_GetTouchDeviceName = SDL_TouchID -> IO (PtrConst CChar)
hs_bindgen_abb682109ef47145
foreign import ccall unsafe "hs_bindgen_bba2e3647e7dd111"
hs_bindgen_bba2e3647e7dd111_base
:: HsBindgen.Runtime.LibC.Word64
-> IO BG.CInt
hs_bindgen_bba2e3647e7dd111
:: SDL_TouchID
-> IO SDL_TouchDeviceType
hs_bindgen_bba2e3647e7dd111 :: SDL_TouchID -> IO SDL_TouchDeviceType
hs_bindgen_bba2e3647e7dd111 =
\SDL_TouchID
x0 ->
(CInt -> SDL_TouchDeviceType) -> IO CInt -> IO SDL_TouchDeviceType
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap CInt -> SDL_TouchDeviceType
FFIType SDL_TouchDeviceType -> SDL_TouchDeviceType
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType (Word64 -> IO CInt
hs_bindgen_bba2e3647e7dd111_base (SDL_TouchID -> FFIType SDL_TouchID
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType SDL_TouchID
x0))
sDL_GetTouchDeviceType
:: SDL_TouchID
-> IO SDL_TouchDeviceType
sDL_GetTouchDeviceType :: SDL_TouchID -> IO SDL_TouchDeviceType
sDL_GetTouchDeviceType = SDL_TouchID -> IO SDL_TouchDeviceType
hs_bindgen_bba2e3647e7dd111
foreign import ccall unsafe "hs_bindgen_645cd3b208b9edce"
hs_bindgen_645cd3b208b9edce_base
:: HsBindgen.Runtime.LibC.Word64
-> BG.Ptr BG.Void
-> IO (BG.Ptr BG.Void)
hs_bindgen_645cd3b208b9edce
:: SDL_TouchID
-> BG.Ptr BG.CInt
-> IO (BG.Ptr (BG.Ptr SDL_Finger))
hs_bindgen_645cd3b208b9edce :: SDL_TouchID -> Ptr CInt -> IO (Ptr (Ptr SDL_Finger))
hs_bindgen_645cd3b208b9edce =
\SDL_TouchID
x0 ->
\Ptr CInt
x1 ->
(Ptr Void -> Ptr (Ptr SDL_Finger))
-> IO (Ptr Void) -> IO (Ptr (Ptr SDL_Finger))
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Ptr Void -> Ptr (Ptr SDL_Finger)
FFIType (Ptr (Ptr SDL_Finger)) -> Ptr (Ptr SDL_Finger)
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType (Word64 -> Ptr Void -> IO (Ptr Void)
hs_bindgen_645cd3b208b9edce_base (SDL_TouchID -> FFIType SDL_TouchID
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType SDL_TouchID
x0) (Ptr CInt -> FFIType (Ptr CInt)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Ptr CInt
x1))
sDL_GetTouchFingers
:: SDL_TouchID
-> BG.Ptr BG.CInt
-> IO (BG.Ptr (BG.Ptr SDL_Finger))
sDL_GetTouchFingers :: SDL_TouchID -> Ptr CInt -> IO (Ptr (Ptr SDL_Finger))
sDL_GetTouchFingers = SDL_TouchID -> Ptr CInt -> IO (Ptr (Ptr SDL_Finger))
hs_bindgen_645cd3b208b9edce