Safe Haskell | None |
---|---|
Language | Haskell98 |
Helper functions for binding ffi, encoding, decoding via messagepack
Documentation
toMsg :: ComponentClass o => o -> ByteString Source
fromMsg :: ComponentClass o => ByteString -> Maybe o Source
mkMsgFunPtr :: MsgFunction -> IO (FunPtr MsgFunction) Source
callMsgFunction :: FunPtr MsgFunction -> Ptr () -> Word64 -> ByteString -> IO Int Source
type InitFunction = Ptr () -> IO Word32 Source
callInitFunction :: FunPtr InitFunction -> Ptr () -> IO Int Source
type EntityDataReleaseFunction = Ptr () -> IO () Source
type CallbackSystemCreateFunction = Ptr (Ptr ()) -> IO () Source
mkCallbackSystemCreateFunction :: FunPtr CallbackSystemCreateFunction -> CallbackSystemCreateFunction Source
type CallbackSystemRegisterReceiverFunction = Ptr () -> Ptr () -> Word64 -> FunPtr (Ptr () -> Word64 -> Ptr CChar -> Word32 -> IO Word32) -> IO () Source
mkCallbackSystemRegisterReceiverFunction :: FunPtr CallbackSystemRegisterReceiverFunction -> CallbackSystemRegisterReceiverFunction 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
entitySet :: ByteString -> Ptr () -> IO () Source
entityDataRead :: Ptr () -> IO ByteString Source
entityDataRelease :: Ptr () -> IO () Source
callbackSystemCreate :: IO (Ptr ()) Source
callbackSystemRegisterReceiver :: Ptr () -> Ptr () -> Word64 -> FunPtr (Ptr () -> Word64 -> Ptr CChar -> Word32 -> IO Word32) -> IO () Source
callbackSystemStep :: Ptr () -> IO () Source