{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE NoFieldSelectors #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_HADDOCK prune #-}

module SDL3.Sys.Bindgen.Platform.Unsafe (
  SDL3.Sys.Bindgen.Platform.Unsafe.sDL_GetPlatform,
)
where

import Prelude (IO, fmap)

import HsBindgen.Runtime.PtrConst qualified as PtrConst
import HsBindgen.Runtime.Support qualified as BG
import HsBindgen.Runtime.Support.CAPI qualified

$( 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_platform.h>"
         , "char const *hs_bindgen_6a11aa5547a2bc81 (void)"
         , "{"
         , "  return (SDL_GetPlatform)();"
         , "}"
         ]
     )
 )

-- __unique:__ @sdl3bindgensys_SDL3.Sys.Bindgen.Platform_Unsafe_SDL_GetPlatform@
foreign import ccall unsafe "hs_bindgen_6a11aa5547a2bc81"
  hs_bindgen_6a11aa5547a2bc81_base
    :: IO (BG.Ptr BG.Void)

-- __unique:__ @sdl3bindgensys_SDL3.Sys.Bindgen.Platform_Unsafe_SDL_GetPlatform@
hs_bindgen_6a11aa5547a2bc81 :: IO (PtrConst.PtrConst BG.CChar)
hs_bindgen_6a11aa5547a2bc81 :: IO (PtrConst CChar)
hs_bindgen_6a11aa5547a2bc81 =
  (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_6a11aa5547a2bc81_base

-- | [C declaration]: @SDL_GetPlatform@, defined at @SDL3\/SDL_platform.h 58:42@
sDL_GetPlatform :: IO (PtrConst.PtrConst BG.CChar)
sDL_GetPlatform :: IO (PtrConst CChar)
sDL_GetPlatform = IO (PtrConst CChar)
hs_bindgen_6a11aa5547a2bc81