nanovg-0.5.2.0: Haskell bindings for nanovg

Safe HaskellSafe
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

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

Marshalling helper for a constant zero

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