nanovg-0.8.1.0: Haskell bindings for nanovg
Safe HaskellSafe-Inferred
LanguageHaskell2010

NanoVG.Internal.FFIHelpers

Synopsis

Documentation

withCString :: Text -> (CString -> IO b) -> IO b Source #

Marshal a Haskell string into a NUL terminated C string using temporary storage.

useAsCStringLen' :: ByteString -> ((Ptr CUChar, CInt) -> IO a) -> IO a Source #

Wrapper around useAsCStringLen that uses CUChars

useAsPtr :: ByteString -> (Ptr CUChar -> IO a) -> IO a Source #

Wrapper around useAsCStringLen' that discards the length

one :: Num a => (a -> b) -> b Source #

Marshalling helper for a constant one

null :: (Ptr a -> b) -> b Source #

Marshalling helper for a constant nullPtr

bitMask :: Enum a => Set a -> CInt Source #

Combine the values in the set using a bitwise or