{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE NoFieldSelectors #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_HADDOCK prune #-}
module SDL3.Sys.Bindgen.Filesystem.Safe (
SDL3.Sys.Bindgen.Filesystem.Safe.sDL_GetBasePath,
SDL3.Sys.Bindgen.Filesystem.Safe.sDL_GetPrefPath,
SDL3.Sys.Bindgen.Filesystem.Safe.sDL_GetUserFolder,
SDL3.Sys.Bindgen.Filesystem.Safe.sDL_CreateDirectory,
SDL3.Sys.Bindgen.Filesystem.Safe.sDL_EnumerateDirectory,
SDL3.Sys.Bindgen.Filesystem.Safe.sDL_RemovePath,
SDL3.Sys.Bindgen.Filesystem.Safe.sDL_RenamePath,
SDL3.Sys.Bindgen.Filesystem.Safe.sDL_CopyFile,
SDL3.Sys.Bindgen.Filesystem.Safe.sDL_GetPathInfo,
SDL3.Sys.Bindgen.Filesystem.Safe.sDL_GlobDirectory,
SDL3.Sys.Bindgen.Filesystem.Safe.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_f92cc8ff07ef9740 (void)"
, "{"
, " return (SDL_GetBasePath)();"
, "}"
, "char *hs_bindgen_619cc1fa3f4aefd0 ("
, " char const *arg1,"
, " char const *arg2"
, ")"
, "{"
, " return (SDL_GetPrefPath)(arg1, arg2);"
, "}"
, "char const *hs_bindgen_c6c5688c3bb20e35 ("
, " SDL_Folder arg1"
, ")"
, "{"
, " return (SDL_GetUserFolder)(arg1);"
, "}"
, "_Bool hs_bindgen_9f1feb13cd45a33b ("
, " char const *arg1"
, ")"
, "{"
, " return (SDL_CreateDirectory)(arg1);"
, "}"
, "_Bool hs_bindgen_e94d2a77c1f86c96 ("
, " char const *arg1,"
, " SDL_EnumerateDirectoryCallback arg2,"
, " void *arg3"
, ")"
, "{"
, " return (SDL_EnumerateDirectory)(arg1, arg2, arg3);"
, "}"
, "_Bool hs_bindgen_84b6008494da965d ("
, " char const *arg1"
, ")"
, "{"
, " return (SDL_RemovePath)(arg1);"
, "}"
, "_Bool hs_bindgen_41cbbf30c063ebd5 ("
, " char const *arg1,"
, " char const *arg2"
, ")"
, "{"
, " return (SDL_RenamePath)(arg1, arg2);"
, "}"
, "_Bool hs_bindgen_4feaee53c2645e31 ("
, " char const *arg1,"
, " char const *arg2"
, ")"
, "{"
, " return (SDL_CopyFile)(arg1, arg2);"
, "}"
, "_Bool hs_bindgen_caa951538e03e0b0 ("
, " char const *arg1,"
, " SDL_PathInfo *arg2"
, ")"
, "{"
, " return (SDL_GetPathInfo)(arg1, arg2);"
, "}"
, "char **hs_bindgen_fb5d363e95cc2777 ("
, " char const *arg1,"
, " char const *arg2,"
, " SDL_GlobFlags arg3,"
, " signed int *arg4"
, ")"
, "{"
, " return (SDL_GlobDirectory)(arg1, arg2, arg3, arg4);"
, "}"
, "char *hs_bindgen_1c738c64af33b51a (void)"
, "{"
, " return (SDL_GetCurrentDirectory)();"
, "}"
]
)
)
foreign import ccall safe "hs_bindgen_f92cc8ff07ef9740"
hs_bindgen_f92cc8ff07ef9740_base
:: IO (BG.Ptr BG.Void)
hs_bindgen_f92cc8ff07ef9740 :: IO (PtrConst.PtrConst BG.CChar)
hs_bindgen_f92cc8ff07ef9740 :: IO (PtrConst CChar)
hs_bindgen_f92cc8ff07ef9740 =
(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_f92cc8ff07ef9740_base
sDL_GetBasePath :: IO (PtrConst.PtrConst BG.CChar)
sDL_GetBasePath :: IO (PtrConst CChar)
sDL_GetBasePath = IO (PtrConst CChar)
hs_bindgen_f92cc8ff07ef9740
foreign import ccall safe "hs_bindgen_619cc1fa3f4aefd0"
hs_bindgen_619cc1fa3f4aefd0_base
:: BG.Ptr BG.Void
-> BG.Ptr BG.Void
-> IO (BG.Ptr BG.Void)
hs_bindgen_619cc1fa3f4aefd0
:: PtrConst.PtrConst BG.CChar
-> PtrConst.PtrConst BG.CChar
-> IO (BG.Ptr BG.CChar)
hs_bindgen_619cc1fa3f4aefd0 :: PtrConst CChar -> PtrConst CChar -> IO (Ptr CChar)
hs_bindgen_619cc1fa3f4aefd0 =
\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_619cc1fa3f4aefd0_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_619cc1fa3f4aefd0
foreign import ccall safe "hs_bindgen_c6c5688c3bb20e35"
hs_bindgen_c6c5688c3bb20e35_base
:: BG.CUInt
-> IO (BG.Ptr BG.Void)
hs_bindgen_c6c5688c3bb20e35
:: SDL_Folder
-> IO (PtrConst.PtrConst BG.CChar)
hs_bindgen_c6c5688c3bb20e35 :: SDL_Folder -> IO (PtrConst CChar)
hs_bindgen_c6c5688c3bb20e35 =
\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_c6c5688c3bb20e35_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_c6c5688c3bb20e35
foreign import ccall safe "hs_bindgen_9f1feb13cd45a33b"
hs_bindgen_9f1feb13cd45a33b_base
:: BG.Ptr BG.Void
-> IO BG.CBool
hs_bindgen_9f1feb13cd45a33b
:: PtrConst.PtrConst BG.CChar
-> IO BG.CBool
hs_bindgen_9f1feb13cd45a33b :: PtrConst CChar -> IO CBool
hs_bindgen_9f1feb13cd45a33b =
\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_9f1feb13cd45a33b_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_9f1feb13cd45a33b
foreign import ccall safe "hs_bindgen_e94d2a77c1f86c96"
hs_bindgen_e94d2a77c1f86c96_base
:: BG.Ptr BG.Void
-> BG.FunPtr BG.Void
-> BG.Ptr BG.Void
-> IO BG.CBool
hs_bindgen_e94d2a77c1f86c96
:: PtrConst.PtrConst BG.CChar
-> SDL_EnumerateDirectoryCallback
-> BG.Ptr BG.Void
-> IO BG.CBool
hs_bindgen_e94d2a77c1f86c96 :: PtrConst CChar
-> SDL_EnumerateDirectoryCallback -> Ptr Void -> IO CBool
hs_bindgen_e94d2a77c1f86c96 =
\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_e94d2a77c1f86c96_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_e94d2a77c1f86c96
foreign import ccall safe "hs_bindgen_84b6008494da965d"
hs_bindgen_84b6008494da965d_base
:: BG.Ptr BG.Void
-> IO BG.CBool
hs_bindgen_84b6008494da965d
:: PtrConst.PtrConst BG.CChar
-> IO BG.CBool
hs_bindgen_84b6008494da965d :: PtrConst CChar -> IO CBool
hs_bindgen_84b6008494da965d =
\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_84b6008494da965d_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_84b6008494da965d
foreign import ccall safe "hs_bindgen_41cbbf30c063ebd5"
hs_bindgen_41cbbf30c063ebd5_base
:: BG.Ptr BG.Void
-> BG.Ptr BG.Void
-> IO BG.CBool
hs_bindgen_41cbbf30c063ebd5
:: PtrConst.PtrConst BG.CChar
-> PtrConst.PtrConst BG.CChar
-> IO BG.CBool
hs_bindgen_41cbbf30c063ebd5 :: PtrConst CChar -> PtrConst CChar -> IO CBool
hs_bindgen_41cbbf30c063ebd5 =
\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_41cbbf30c063ebd5_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_41cbbf30c063ebd5
foreign import ccall safe "hs_bindgen_4feaee53c2645e31"
hs_bindgen_4feaee53c2645e31_base
:: BG.Ptr BG.Void
-> BG.Ptr BG.Void
-> IO BG.CBool
hs_bindgen_4feaee53c2645e31
:: PtrConst.PtrConst BG.CChar
-> PtrConst.PtrConst BG.CChar
-> IO BG.CBool
hs_bindgen_4feaee53c2645e31 :: PtrConst CChar -> PtrConst CChar -> IO CBool
hs_bindgen_4feaee53c2645e31 =
\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_4feaee53c2645e31_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_4feaee53c2645e31
foreign import ccall safe "hs_bindgen_caa951538e03e0b0"
hs_bindgen_caa951538e03e0b0_base
:: BG.Ptr BG.Void
-> BG.Ptr BG.Void
-> IO BG.CBool
hs_bindgen_caa951538e03e0b0
:: PtrConst.PtrConst BG.CChar
-> BG.Ptr SDL_PathInfo
-> IO BG.CBool
hs_bindgen_caa951538e03e0b0 :: PtrConst CChar -> Ptr SDL_PathInfo -> IO CBool
hs_bindgen_caa951538e03e0b0 =
\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_caa951538e03e0b0_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_caa951538e03e0b0
foreign import ccall safe "hs_bindgen_fb5d363e95cc2777"
hs_bindgen_fb5d363e95cc2777_base
:: BG.Ptr BG.Void
-> BG.Ptr BG.Void
-> HsBindgen.Runtime.LibC.Word32
-> BG.Ptr BG.Void
-> IO (BG.Ptr BG.Void)
hs_bindgen_fb5d363e95cc2777
:: PtrConst.PtrConst BG.CChar
-> PtrConst.PtrConst BG.CChar
-> SDL_GlobFlags
-> BG.Ptr BG.CInt
-> IO (BG.Ptr (BG.Ptr BG.CChar))
hs_bindgen_fb5d363e95cc2777 :: PtrConst CChar
-> PtrConst CChar
-> SDL_GlobFlags
-> Ptr CInt
-> IO (Ptr (Ptr CChar))
hs_bindgen_fb5d363e95cc2777 =
\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_fb5d363e95cc2777_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_fb5d363e95cc2777
foreign import ccall safe "hs_bindgen_1c738c64af33b51a"
hs_bindgen_1c738c64af33b51a_base
:: IO (BG.Ptr BG.Void)
hs_bindgen_1c738c64af33b51a :: IO (BG.Ptr BG.CChar)
hs_bindgen_1c738c64af33b51a :: IO (Ptr CChar)
hs_bindgen_1c738c64af33b51a =
(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_1c738c64af33b51a_base
sDL_GetCurrentDirectory :: IO (BG.Ptr BG.CChar)
sDL_GetCurrentDirectory :: IO (Ptr CChar)
sDL_GetCurrentDirectory = IO (Ptr CChar)
hs_bindgen_1c738c64af33b51a