dear-imgui-raw-internal-1.0.0: src/DearImGui/Raw/Internal/ImBitArrayForNamedKeys.hsc
{-# LANGUAGE CApiFFI #-}
{-# LANGUAGE PatternSynonyms #-}
-- This file was generated by dear-bindings-ffi. Do not edit by hand.
module DearImGui.Raw.Internal.ImBitArrayForNamedKeys
( ImBitArrayForNamedKeys
, __dummyLength
, destroy
, init
, withDefault
) where
import Control.Exception (bracket_)
import Foreign.C.Types
import Foreign.Marshal.Alloc (alloca)
import Foreign.Ptr (Ptr, plusPtr)
import Foreign.Storable (Storable (..))
import GHC.Records (HasField (..))
import Prelude hiding (init)
#include "dcimgui_nodefaultargfunctions_internal.h"
-- structs (opaque)
data ImBitArrayForNamedKeys
instance Storable ImBitArrayForNamedKeys where
sizeOf _ = #{size ImBitArrayForNamedKeys}
alignment _ = #{alignment ImBitArrayForNamedKeys}
peek _ = error "ImBitArrayForNamedKeys: opaque struct, peek not supported in v0"
poke _ _ = error "ImBitArrayForNamedKeys: opaque struct, poke not supported in v0"
instance HasField "__dummy" (Ptr ImBitArrayForNamedKeys) (Ptr CChar) where
getField = #{ptr ImBitArrayForNamedKeys, __dummy}
__dummyLength :: Int
__dummyLength = #{const 20}
foreign import capi unsafe "DearImGuiWrappers.h ImBitArrayForNamedKeys_Init_wrap"
init
:: Ptr ImBitArrayForNamedKeys
-> IO ()
foreign import capi unsafe "DearImGuiWrappers.h ImBitArrayForNamedKeys_Destroy_wrap"
destroy
:: Ptr ImBitArrayForNamedKeys
-> IO ()
withDefault :: (Ptr ImBitArrayForNamedKeys -> IO a) -> IO a
withDefault k = alloca $ \p -> bracket_ (init p) (destroy p) (k p)