{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE NoFieldSelectors #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_HADDOCK prune #-}
module SDL3.Sys.Bindgen.Filesystem.Unsafe (
SDL3.Sys.Bindgen.Filesystem.Unsafe.sDL_GetBasePath,
SDL3.Sys.Bindgen.Filesystem.Unsafe.sDL_GetPrefPath,
SDL3.Sys.Bindgen.Filesystem.Unsafe.sDL_GetUserFolder,
SDL3.Sys.Bindgen.Filesystem.Unsafe.sDL_CreateDirectory,
SDL3.Sys.Bindgen.Filesystem.Unsafe.sDL_EnumerateDirectory,
SDL3.Sys.Bindgen.Filesystem.Unsafe.sDL_RemovePath,
SDL3.Sys.Bindgen.Filesystem.Unsafe.sDL_RenamePath,
SDL3.Sys.Bindgen.Filesystem.Unsafe.sDL_CopyFile,
SDL3.Sys.Bindgen.Filesystem.Unsafe.sDL_GetPathInfo,
SDL3.Sys.Bindgen.Filesystem.Unsafe.sDL_GlobDirectory,
SDL3.Sys.Bindgen.Filesystem.Unsafe.sDL_GetCurrentDirectory,
)
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.Filesystem
$( 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_filesystem.h>"
, "char const *hs_bindgen_f982860586cddc48 (void)"
, "{"
, " return (SDL_GetBasePath)();"
, "}"
, "char *hs_bindgen_207e183641556ba0 ("
, " char const *arg1,"
, " char const *arg2"
, ")"
, "{"
, " return (SDL_GetPrefPath)(arg1, arg2);"
, "}"
, "char const *hs_bindgen_1e54016bd792c622 ("
, " SDL_Folder arg1"
, ")"
, "{"
, " return (SDL_GetUserFolder)(arg1);"
, "}"
, "_Bool hs_bindgen_3d4b267fb1966244 ("
, " char const *arg1"
, ")"
, "{"
, " return (SDL_CreateDirectory)(arg1);"
, "}"
, "_Bool hs_bindgen_2cd5a0aba8d0a754 ("
, " char const *arg1,"
, " SDL_EnumerateDirectoryCallback arg2,"
, " void *arg3"
, ")"
, "{"
, " return (SDL_EnumerateDirectory)(arg1, arg2, arg3);"
, "}"
, "_Bool hs_bindgen_768df4cf2a845ec6 ("
, " char const *arg1"
, ")"
, "{"
, " return (SDL_RemovePath)(arg1);"
, "}"
, "_Bool hs_bindgen_8e887e0ab35ae63b ("
, " char const *arg1,"
, " char const *arg2"
, ")"
, "{"
, " return (SDL_RenamePath)(arg1, arg2);"
, "}"
, "_Bool hs_bindgen_936ea99b7b61f849 ("
, " char const *arg1,"
, " char const *arg2"
, ")"
, "{"
, " return (SDL_CopyFile)(arg1, arg2);"
, "}"
, "_Bool hs_bindgen_6d818186cbd1c026 ("
, " char const *arg1,"
, " SDL_PathInfo *arg2"
, ")"
, "{"
, " return (SDL_GetPathInfo)(arg1, arg2);"
, "}"
, "char **hs_bindgen_9478904045755e53 ("
, " char const *arg1,"
, " char const *arg2,"
, " SDL_GlobFlags arg3,"
, " signed int *arg4"
, ")"
, "{"
, " return (SDL_GlobDirectory)(arg1, arg2, arg3, arg4);"
, "}"
, "char *hs_bindgen_74e4e1cd3e20672c (void)"
, "{"
, " return (SDL_GetCurrentDirectory)();"
, "}"
]
)
)
foreign import ccall unsafe "hs_bindgen_f982860586cddc48"
hs_bindgen_f982860586cddc48_base
:: IO (BG.Ptr BG.Void)
hs_bindgen_f982860586cddc48 :: IO (PtrConst.PtrConst BG.CChar)
hs_bindgen_f982860586cddc48 :: IO (PtrConst CChar)
hs_bindgen_f982860586cddc48 =
(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 IO (Ptr Void)
hs_bindgen_f982860586cddc48_base
sDL_GetBasePath :: IO (PtrConst.PtrConst BG.CChar)
sDL_GetBasePath :: IO (PtrConst CChar)
sDL_GetBasePath = IO (PtrConst CChar)
hs_bindgen_f982860586cddc48
foreign import ccall unsafe "hs_bindgen_207e183641556ba0"
hs_bindgen_207e183641556ba0_base
:: BG.Ptr BG.Void
-> BG.Ptr BG.Void
-> IO (BG.Ptr BG.Void)
hs_bindgen_207e183641556ba0
:: PtrConst.PtrConst BG.CChar
-> PtrConst.PtrConst BG.CChar
-> IO (BG.Ptr BG.CChar)
hs_bindgen_207e183641556ba0 :: PtrConst CChar -> PtrConst CChar -> IO (Ptr CChar)
hs_bindgen_207e183641556ba0 =
\PtrConst CChar
x0 ->
\PtrConst CChar
x1 ->
(Ptr Void -> Ptr CChar) -> IO (Ptr Void) -> IO (Ptr 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 -> Ptr CChar
FFIType (Ptr CChar) -> Ptr CChar
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType (Ptr Void -> Ptr Void -> IO (Ptr Void)
hs_bindgen_207e183641556ba0_base (PtrConst CChar -> FFIType (PtrConst CChar)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType PtrConst CChar
x0) (PtrConst CChar -> FFIType (PtrConst CChar)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType PtrConst CChar
x1))
sDL_GetPrefPath
:: PtrConst.PtrConst BG.CChar
-> PtrConst.PtrConst BG.CChar
-> IO (BG.Ptr BG.CChar)
sDL_GetPrefPath :: PtrConst CChar -> PtrConst CChar -> IO (Ptr CChar)
sDL_GetPrefPath = PtrConst CChar -> PtrConst CChar -> IO (Ptr CChar)
hs_bindgen_207e183641556ba0
foreign import ccall unsafe "hs_bindgen_1e54016bd792c622"
hs_bindgen_1e54016bd792c622_base
:: BG.CUInt
-> IO (BG.Ptr BG.Void)
hs_bindgen_1e54016bd792c622
:: SDL_Folder
-> IO (PtrConst.PtrConst BG.CChar)
hs_bindgen_1e54016bd792c622 :: SDL_Folder -> IO (PtrConst CChar)
hs_bindgen_1e54016bd792c622 =
\SDL_Folder
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 (CUInt -> IO (Ptr Void)
hs_bindgen_1e54016bd792c622_base (SDL_Folder -> FFIType SDL_Folder
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType SDL_Folder
x0))
sDL_GetUserFolder
:: SDL_Folder
-> IO (PtrConst.PtrConst BG.CChar)
sDL_GetUserFolder :: SDL_Folder -> IO (PtrConst CChar)
sDL_GetUserFolder = SDL_Folder -> IO (PtrConst CChar)
hs_bindgen_1e54016bd792c622
foreign import ccall unsafe "hs_bindgen_3d4b267fb1966244"
hs_bindgen_3d4b267fb1966244_base
:: BG.Ptr BG.Void
-> IO BG.CBool
hs_bindgen_3d4b267fb1966244
:: PtrConst.PtrConst BG.CChar
-> IO BG.CBool
hs_bindgen_3d4b267fb1966244 :: PtrConst CChar -> IO CBool
hs_bindgen_3d4b267fb1966244 =
\PtrConst CChar
x0 ->
(CBool -> CBool) -> IO CBool -> IO CBool
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap CBool -> CBool
FFIType CBool -> CBool
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType (Ptr Void -> IO CBool
hs_bindgen_3d4b267fb1966244_base (PtrConst CChar -> FFIType (PtrConst CChar)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType PtrConst CChar
x0))
sDL_CreateDirectory
:: PtrConst.PtrConst BG.CChar
-> IO BG.CBool
sDL_CreateDirectory :: PtrConst CChar -> IO CBool
sDL_CreateDirectory = PtrConst CChar -> IO CBool
hs_bindgen_3d4b267fb1966244
foreign import ccall unsafe "hs_bindgen_2cd5a0aba8d0a754"
hs_bindgen_2cd5a0aba8d0a754_base
:: BG.Ptr BG.Void
-> BG.FunPtr BG.Void
-> BG.Ptr BG.Void
-> IO BG.CBool
hs_bindgen_2cd5a0aba8d0a754
:: PtrConst.PtrConst BG.CChar
-> SDL_EnumerateDirectoryCallback
-> BG.Ptr BG.Void
-> IO BG.CBool
hs_bindgen_2cd5a0aba8d0a754 :: PtrConst CChar
-> SDL_EnumerateDirectoryCallback -> Ptr Void -> IO CBool
hs_bindgen_2cd5a0aba8d0a754 =
\PtrConst CChar
x0 ->
\SDL_EnumerateDirectoryCallback
x1 ->
\Ptr Void
x2 ->
(CBool -> CBool) -> IO CBool -> IO CBool
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap
CBool -> CBool
FFIType CBool -> CBool
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType
(Ptr Void -> FunPtr Void -> Ptr Void -> IO CBool
hs_bindgen_2cd5a0aba8d0a754_base (PtrConst CChar -> FFIType (PtrConst CChar)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType PtrConst CChar
x0) (SDL_EnumerateDirectoryCallback
-> FFIType SDL_EnumerateDirectoryCallback
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType SDL_EnumerateDirectoryCallback
x1) (Ptr Void -> FFIType (Ptr Void)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Ptr Void
x2))
sDL_EnumerateDirectory
:: PtrConst.PtrConst BG.CChar
-> SDL_EnumerateDirectoryCallback
-> BG.Ptr BG.Void
-> IO BG.CBool
sDL_EnumerateDirectory :: PtrConst CChar
-> SDL_EnumerateDirectoryCallback -> Ptr Void -> IO CBool
sDL_EnumerateDirectory = PtrConst CChar
-> SDL_EnumerateDirectoryCallback -> Ptr Void -> IO CBool
hs_bindgen_2cd5a0aba8d0a754
foreign import ccall unsafe "hs_bindgen_768df4cf2a845ec6"
hs_bindgen_768df4cf2a845ec6_base
:: BG.Ptr BG.Void
-> IO BG.CBool
hs_bindgen_768df4cf2a845ec6
:: PtrConst.PtrConst BG.CChar
-> IO BG.CBool
hs_bindgen_768df4cf2a845ec6 :: PtrConst CChar -> IO CBool
hs_bindgen_768df4cf2a845ec6 =
\PtrConst CChar
x0 ->
(CBool -> CBool) -> IO CBool -> IO CBool
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap CBool -> CBool
FFIType CBool -> CBool
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType (Ptr Void -> IO CBool
hs_bindgen_768df4cf2a845ec6_base (PtrConst CChar -> FFIType (PtrConst CChar)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType PtrConst CChar
x0))
sDL_RemovePath
:: PtrConst.PtrConst BG.CChar
-> IO BG.CBool
sDL_RemovePath :: PtrConst CChar -> IO CBool
sDL_RemovePath = PtrConst CChar -> IO CBool
hs_bindgen_768df4cf2a845ec6
foreign import ccall unsafe "hs_bindgen_8e887e0ab35ae63b"
hs_bindgen_8e887e0ab35ae63b_base
:: BG.Ptr BG.Void
-> BG.Ptr BG.Void
-> IO BG.CBool
hs_bindgen_8e887e0ab35ae63b
:: PtrConst.PtrConst BG.CChar
-> PtrConst.PtrConst BG.CChar
-> IO BG.CBool
hs_bindgen_8e887e0ab35ae63b :: PtrConst CChar -> PtrConst CChar -> IO CBool
hs_bindgen_8e887e0ab35ae63b =
\PtrConst CChar
x0 ->
\PtrConst CChar
x1 ->
(CBool -> CBool) -> IO CBool -> IO CBool
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap CBool -> CBool
FFIType CBool -> CBool
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType (Ptr Void -> Ptr Void -> IO CBool
hs_bindgen_8e887e0ab35ae63b_base (PtrConst CChar -> FFIType (PtrConst CChar)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType PtrConst CChar
x0) (PtrConst CChar -> FFIType (PtrConst CChar)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType PtrConst CChar
x1))
sDL_RenamePath
:: PtrConst.PtrConst BG.CChar
-> PtrConst.PtrConst BG.CChar
-> IO BG.CBool
sDL_RenamePath :: PtrConst CChar -> PtrConst CChar -> IO CBool
sDL_RenamePath = PtrConst CChar -> PtrConst CChar -> IO CBool
hs_bindgen_8e887e0ab35ae63b
foreign import ccall unsafe "hs_bindgen_936ea99b7b61f849"
hs_bindgen_936ea99b7b61f849_base
:: BG.Ptr BG.Void
-> BG.Ptr BG.Void
-> IO BG.CBool
hs_bindgen_936ea99b7b61f849
:: PtrConst.PtrConst BG.CChar
-> PtrConst.PtrConst BG.CChar
-> IO BG.CBool
hs_bindgen_936ea99b7b61f849 :: PtrConst CChar -> PtrConst CChar -> IO CBool
hs_bindgen_936ea99b7b61f849 =
\PtrConst CChar
x0 ->
\PtrConst CChar
x1 ->
(CBool -> CBool) -> IO CBool -> IO CBool
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap CBool -> CBool
FFIType CBool -> CBool
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType (Ptr Void -> Ptr Void -> IO CBool
hs_bindgen_936ea99b7b61f849_base (PtrConst CChar -> FFIType (PtrConst CChar)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType PtrConst CChar
x0) (PtrConst CChar -> FFIType (PtrConst CChar)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType PtrConst CChar
x1))
sDL_CopyFile
:: PtrConst.PtrConst BG.CChar
-> PtrConst.PtrConst BG.CChar
-> IO BG.CBool
sDL_CopyFile :: PtrConst CChar -> PtrConst CChar -> IO CBool
sDL_CopyFile = PtrConst CChar -> PtrConst CChar -> IO CBool
hs_bindgen_936ea99b7b61f849
foreign import ccall unsafe "hs_bindgen_6d818186cbd1c026"
hs_bindgen_6d818186cbd1c026_base
:: BG.Ptr BG.Void
-> BG.Ptr BG.Void
-> IO BG.CBool
hs_bindgen_6d818186cbd1c026
:: PtrConst.PtrConst BG.CChar
-> BG.Ptr SDL_PathInfo
-> IO BG.CBool
hs_bindgen_6d818186cbd1c026 :: PtrConst CChar -> Ptr SDL_PathInfo -> IO CBool
hs_bindgen_6d818186cbd1c026 =
\PtrConst CChar
x0 ->
\Ptr SDL_PathInfo
x1 ->
(CBool -> CBool) -> IO CBool -> IO CBool
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap CBool -> CBool
FFIType CBool -> CBool
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType (Ptr Void -> Ptr Void -> IO CBool
hs_bindgen_6d818186cbd1c026_base (PtrConst CChar -> FFIType (PtrConst CChar)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType PtrConst CChar
x0) (Ptr SDL_PathInfo -> FFIType (Ptr SDL_PathInfo)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Ptr SDL_PathInfo
x1))
sDL_GetPathInfo
:: PtrConst.PtrConst BG.CChar
-> BG.Ptr SDL_PathInfo
-> IO BG.CBool
sDL_GetPathInfo :: PtrConst CChar -> Ptr SDL_PathInfo -> IO CBool
sDL_GetPathInfo = PtrConst CChar -> Ptr SDL_PathInfo -> IO CBool
hs_bindgen_6d818186cbd1c026
foreign import ccall unsafe "hs_bindgen_9478904045755e53"
hs_bindgen_9478904045755e53_base
:: BG.Ptr BG.Void
-> BG.Ptr BG.Void
-> HsBindgen.Runtime.LibC.Word32
-> BG.Ptr BG.Void
-> IO (BG.Ptr BG.Void)
hs_bindgen_9478904045755e53
:: PtrConst.PtrConst BG.CChar
-> PtrConst.PtrConst BG.CChar
-> SDL_GlobFlags
-> BG.Ptr BG.CInt
-> IO (BG.Ptr (BG.Ptr BG.CChar))
hs_bindgen_9478904045755e53 :: PtrConst CChar
-> PtrConst CChar
-> SDL_GlobFlags
-> Ptr CInt
-> IO (Ptr (Ptr CChar))
hs_bindgen_9478904045755e53 =
\PtrConst CChar
x0 ->
\PtrConst CChar
x1 ->
\SDL_GlobFlags
x2 ->
\Ptr CInt
x3 ->
(Ptr Void -> Ptr (Ptr CChar))
-> IO (Ptr Void) -> IO (Ptr (Ptr 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 -> Ptr (Ptr CChar)
FFIType (Ptr (Ptr CChar)) -> Ptr (Ptr CChar)
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType
( Ptr Void -> Ptr Void -> Word32 -> Ptr Void -> IO (Ptr Void)
hs_bindgen_9478904045755e53_base
(PtrConst CChar -> FFIType (PtrConst CChar)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType PtrConst CChar
x0)
(PtrConst CChar -> FFIType (PtrConst CChar)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType PtrConst CChar
x1)
(SDL_GlobFlags -> FFIType SDL_GlobFlags
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType SDL_GlobFlags
x2)
(Ptr CInt -> FFIType (Ptr CInt)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Ptr CInt
x3)
)
sDL_GlobDirectory
:: PtrConst.PtrConst BG.CChar
-> PtrConst.PtrConst BG.CChar
-> SDL_GlobFlags
-> BG.Ptr BG.CInt
-> IO (BG.Ptr (BG.Ptr BG.CChar))
sDL_GlobDirectory :: PtrConst CChar
-> PtrConst CChar
-> SDL_GlobFlags
-> Ptr CInt
-> IO (Ptr (Ptr CChar))
sDL_GlobDirectory = PtrConst CChar
-> PtrConst CChar
-> SDL_GlobFlags
-> Ptr CInt
-> IO (Ptr (Ptr CChar))
hs_bindgen_9478904045755e53
foreign import ccall unsafe "hs_bindgen_74e4e1cd3e20672c"
hs_bindgen_74e4e1cd3e20672c_base
:: IO (BG.Ptr BG.Void)
hs_bindgen_74e4e1cd3e20672c :: IO (BG.Ptr BG.CChar)
hs_bindgen_74e4e1cd3e20672c :: IO (Ptr CChar)
hs_bindgen_74e4e1cd3e20672c =
(Ptr Void -> Ptr CChar) -> IO (Ptr Void) -> IO (Ptr 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 -> Ptr CChar
FFIType (Ptr CChar) -> Ptr CChar
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType IO (Ptr Void)
hs_bindgen_74e4e1cd3e20672c_base
sDL_GetCurrentDirectory :: IO (BG.Ptr BG.CChar)
sDL_GetCurrentDirectory :: IO (Ptr CChar)
sDL_GetCurrentDirectory = IO (Ptr CChar)
hs_bindgen_74e4e1cd3e20672c