fontconfig-pure-0.5.1.0: Queries your system (Linux/BSD/etc) font database.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Graphics.Text.Font.Choose.Internal.FFI

Description

Utilities for writing language bindings transferring complex parameters. Encoding & decoding parameters via MessagePack.

Synopsis

Documentation

unpackWithErr :: MessagePack a => ByteString -> Maybe a Source #

Decode a MessagePack packet whilst throwing textually-specified exceptions.

withMessageIO :: MessagePack a => (CString -> Int -> IO b) -> a -> IO b Source #

Encode data via MessagePack to pass to an impure C function.

withMessage :: MessagePack a => (CString -> Int -> b) -> a -> b Source #

Encode data via MessagePack to pass to a pure C function.

fromMessage :: MessagePack a => (Ptr Int -> CString) -> Maybe a Source #

Decode data via MessagePack returned from a pure C function.

fromMessage0 :: MessagePack a => (Ptr Int -> CString) -> a Source #

Decode data via MessagePack returned from a pure C function, throwing exceptions upon failed decodes.

fromMessageIO0 :: MessagePack a => (Ptr Int -> IO CString) -> IO a Source #

Decode data via MessagePack returned from an impure C function, throwing exceptions upon failed decodes.

withCString' :: (CString -> a) -> String -> a Source #

Pass a string to a pure C function.

peekCString' :: CString -> String Source #

Return a string from a pure C function

withForeignPtr' :: (Ptr a -> b) -> ForeignPtr a -> b Source #

Unwrap a foreign pointer to pass to a pure C function.