Safe Haskell | None |
---|---|
Language | Haskell98 |
Helper functions for binding ffi, encoding, decoding via messagepack
Documentation
toMsg :: Serialise o => o -> ByteString Source #
fromMsg :: Serialise o => ByteString -> o Source #
mkMsgEntityFnPtr :: MsgEntityFn -> IO (FunPtr MsgEntityFn) Source #
callMsgEntityFn :: FunPtr MsgEntityFn -> Ptr () -> Word64 -> ByteString -> IO Int Source #
callInitFunction :: FunPtr InitFunction -> Ptr () -> IO Int Source #
type EntityDestroyFunction = Ptr () -> IO () Source #
mkEntityReadComponentFunction :: FunPtr EntityReadComponentFunction -> EntityReadComponentFunction Source #
mkEntityWriteComponentFunction :: FunPtr EntityWriteComponentFunction -> EntityWriteComponentFunction Source #
mkObjectLibSystemInitFunction :: FunPtr ObjectLibSystemInitFunction -> ObjectLibSystemInitFunction Source #
mkObjectLibSystemAddEntityFunction :: FunPtr ObjectLibSystemAddEntityFunction -> ObjectLibSystemAddEntityFunction Source #
mkObjectLibSystemRemoveEntityFunction :: FunPtr ObjectLibSystemRemoveEntityFunction -> ObjectLibSystemRemoveEntityFunction Source #
type ObjectLibSystemShutdownFunction = Ptr () -> IO () Source #
mkObjectLibSystemShutdownFunction :: FunPtr ObjectLibSystemShutdownFunction -> ObjectLibSystemShutdownFunction Source #
type ObjectLibSystemStepFunction = Ptr () -> IO () Source #
mkObjectLibSystemStepFunction :: FunPtr ObjectLibSystemStepFunction -> ObjectLibSystemStepFunction Source #
mkCallbackSystemInitFunction :: FunPtr CallbackSystemInitFunction -> CallbackSystemInitFunction Source #
type CallbackSystemRegisterReceiverFunction = Ptr () -> Ptr () -> Word64 -> FunPtr MsgEntityFn -> IO () Source #
mkCallbackSystemRegisterReceiverFunction :: FunPtr CallbackSystemRegisterReceiverFunction -> CallbackSystemRegisterReceiverFunction Source #
type CallbackSystemShutdownFunction = Ptr () -> IO () Source #
mkCallbackSystemShutdownFunction :: FunPtr CallbackSystemShutdownFunction -> CallbackSystemShutdownFunction Source #
type CallbackSystemStepFunction = Ptr () -> IO () Source #
mkCallbackSystemStepFunction :: FunPtr CallbackSystemStepFunction -> CallbackSystemStepFunction Source #
data EntityInterface Source #
type CStringCLen i = (CString, i) Source #
unsafeUseAsCStringLen' :: Integral i => ByteString -> (CStringCLen i -> IO a) -> IO a Source #
entityCreate :: ByteString -> IO (Ptr ()) Source #
entityDestroy :: Ptr () -> IO () Source #
entityWrite :: Ptr () -> Word64 -> ByteString -> IO () Source #
entityRead :: Ptr () -> Word64 -> IO ByteString Source #
objectLibSystemCreate :: ByteString -> IO (Ptr ()) Source #
objectLibSystemStep :: Ptr () -> IO () Source #
objectLibSystemShutdown :: Ptr () -> IO () Source #
callbackSystemCreate :: IO (Ptr ()) Source #
callbackSystemRegisterReceiver :: Ptr () -> Ptr () -> Word64 -> FunPtr (Ptr () -> Word64 -> Ptr CChar -> Word32 -> IO Int32) -> IO () Source #
callbackSystemStep :: Ptr () -> IO () Source #
callbackSystemShutdown :: Ptr () -> IO () Source #