{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE NoFieldSelectors #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_HADDOCK prune #-}
module SDL3.Sys.Bindgen.Power.FunPtr (
SDL3.Sys.Bindgen.Power.FunPtr.sDL_GetPowerInfo,
)
where
import Prelude (IO, fmap)
import HsBindgen.Runtime.Support qualified as BG
import HsBindgen.Runtime.Support.CAPI qualified
import SDL3.Sys.Bindgen.Power
$( 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_power.h>"
, "/* sdl3bindgensys_SDL3.Sys.Bindgen.Power_get_SDL_GetPowerInfo */"
, "__attribute__ ((const))"
, "SDL_PowerState (*hs_bindgen_ccc542a5396280c2 (void)) ("
, " signed int *arg1,"
, " signed int *arg2"
, ")"
, "{"
, " return &SDL_GetPowerInfo;"
, "}"
]
)
)
foreign import ccall unsafe "hs_bindgen_ccc542a5396280c2"
hs_bindgen_ccc542a5396280c2_base
:: IO (BG.FunPtr BG.Void)
hs_bindgen_ccc542a5396280c2
:: IO (BG.FunPtr (BG.Ptr BG.CInt -> BG.Ptr BG.CInt -> IO SDL_PowerState))
hs_bindgen_ccc542a5396280c2 :: IO (FunPtr (Ptr CInt -> Ptr CInt -> IO SDL_PowerState))
hs_bindgen_ccc542a5396280c2 =
(FunPtr Void -> FunPtr (Ptr CInt -> Ptr CInt -> IO SDL_PowerState))
-> IO (FunPtr Void)
-> IO (FunPtr (Ptr CInt -> Ptr CInt -> IO SDL_PowerState))
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap FunPtr Void -> FunPtr (Ptr CInt -> Ptr CInt -> IO SDL_PowerState)
FFIType (FunPtr (Ptr CInt -> Ptr CInt -> IO SDL_PowerState))
-> FunPtr (Ptr CInt -> Ptr CInt -> IO SDL_PowerState)
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType IO (FunPtr Void)
hs_bindgen_ccc542a5396280c2_base
{-# NOINLINE sDL_GetPowerInfo #-}
sDL_GetPowerInfo :: BG.FunPtr (BG.Ptr BG.CInt -> BG.Ptr BG.CInt -> IO SDL_PowerState)
sDL_GetPowerInfo :: FunPtr (Ptr CInt -> Ptr CInt -> IO SDL_PowerState)
sDL_GetPowerInfo =
IO (FunPtr (Ptr CInt -> Ptr CInt -> IO SDL_PowerState))
-> FunPtr (Ptr CInt -> Ptr CInt -> IO SDL_PowerState)
forall a. IO a -> a
BG.unsafePerformIO IO (FunPtr (Ptr CInt -> Ptr CInt -> IO SDL_PowerState))
hs_bindgen_ccc542a5396280c2