Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- gflagsToWord :: (Num b, IsGFlag a) => [a] -> b
- wordToGFlags :: (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
- packGList :: [Ptr a] -> IO (Ptr (GList (Ptr a)))
- unpackGList :: Ptr (GList (Ptr a)) -> IO [Ptr a]
- packGSList :: [Ptr a] -> IO (Ptr (GSList (Ptr a)))
- unpackGSList :: Ptr (GSList (Ptr a)) -> IO [Ptr a]
- packGArray :: forall a. Storable a => [a] -> IO (Ptr (GArray a))
- unpackGArray :: forall a. Storable a => Ptr (GArray a) -> IO [a]
- unrefGArray :: Ptr (GArray a) -> IO ()
- packGPtrArray :: [Ptr a] -> IO (Ptr (GPtrArray (Ptr a)))
- unpackGPtrArray :: Ptr (GPtrArray (Ptr a)) -> IO [Ptr a]
- unrefPtrArray :: Ptr (GPtrArray a) -> IO ()
- packGByteArray :: ByteString -> IO (Ptr GByteArray)
- unpackGByteArray :: Ptr GByteArray -> IO ByteString
- unrefGByteArray :: Ptr GByteArray -> IO ()
- packGHashTable :: GHashFunc a -> GEqualFunc a -> Maybe (GDestroyNotify a) -> Maybe (GDestroyNotify b) -> [(PtrWrapped a, PtrWrapped b)] -> IO (Ptr (GHashTable a b))
- unpackGHashTable :: Ptr (GHashTable a b) -> IO [(PtrWrapped a, PtrWrapped b)]
- unrefGHashTable :: Ptr (GHashTable a b) -> IO ()
- packByteString :: ByteString -> IO (Ptr Word8)
- packZeroTerminatedByteString :: ByteString -> IO (Ptr Word8)
- unpackByteStringWithLength :: Integral a => a -> Ptr Word8 -> IO ByteString
- unpackZeroTerminatedByteString :: Ptr Word8 -> IO ByteString
- packFileNameArray :: [String] -> IO (Ptr CString)
- packZeroTerminatedFileNameArray :: [String] -> IO (Ptr CString)
- unpackZeroTerminatedFileNameArray :: HasCallStack => Ptr CString -> IO [String]
- unpackFileNameArrayWithLength :: (HasCallStack, Integral a) => a -> Ptr CString -> IO [String]
- packUTF8CArray :: [Text] -> IO (Ptr CString)
- packZeroTerminatedUTF8CArray :: [Text] -> IO (Ptr CString)
- unpackUTF8CArrayWithLength :: (HasCallStack, Integral a) => a -> Ptr CString -> IO [Text]
- unpackZeroTerminatedUTF8CArray :: HasCallStack => Ptr CString -> IO [Text]
- packStorableArray :: Storable a => [a] -> IO (Ptr a)
- packZeroTerminatedStorableArray :: (Num a, Storable a) => [a] -> IO (Ptr a)
- unpackStorableArrayWithLength :: (Integral a, Storable b) => a -> Ptr b -> IO [b]
- unpackZeroTerminatedStorableArray :: (Eq a, Num a, Storable a) => Ptr a -> IO [a]
- packMapStorableArray :: forall a b. Storable b => (a -> b) -> [a] -> IO (Ptr b)
- packMapZeroTerminatedStorableArray :: forall a b. (Num b, Storable b) => (a -> b) -> [a] -> IO (Ptr b)
- unpackMapStorableArrayWithLength :: forall a b c. (Integral a, Storable b) => (b -> c) -> a -> Ptr b -> IO [c]
- unpackMapZeroTerminatedStorableArray :: forall a b. (Eq a, Num a, Storable a) => (a -> b) -> Ptr a -> IO [b]
- packPtrArray :: [Ptr a] -> IO (Ptr (Ptr a))
- packZeroTerminatedPtrArray :: [Ptr a] -> IO (Ptr (Ptr a))
- unpackPtrArrayWithLength :: Integral a => a -> Ptr (Ptr b) -> IO [Ptr b]
- unpackZeroTerminatedPtrArray :: Ptr (Ptr a) -> IO [Ptr a]
- packBlockArray :: Int -> [Ptr a] -> IO (Ptr a)
- unpackBlockArrayWithLength :: Integral a => Int -> a -> Ptr b -> IO [Ptr b]
- unpackBoxedArrayWithLength :: forall a b. (Integral a, GBoxed b) => Int -> a -> Ptr b -> IO [Ptr b]
- stringToCString :: String -> IO CString
- cstringToString :: HasCallStack => CString -> IO String
- textToCString :: Text -> IO CString
- withTextCString :: Text -> (CString -> IO a) -> IO a
- cstringToText :: HasCallStack => CString -> IO Text
- byteStringToCString :: ByteString -> IO CString
- cstringToByteString :: HasCallStack => CString -> IO ByteString
- mapZeroTerminatedCArray :: (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
- mapCArrayWithLength :: (Storable a, Integral b) => b -> (a -> IO c) -> Ptr a -> IO ()
- mapGArray :: forall a b. Storable a => (a -> IO b) -> Ptr (GArray a) -> IO ()
- mapPtrArray :: (Ptr a -> IO b) -> Ptr (GPtrArray (Ptr a)) -> IO ()
- mapGList :: (Ptr a -> IO b) -> Ptr (GList (Ptr a)) -> IO ()
- mapGSList :: (Ptr a -> IO b) -> Ptr (GSList (Ptr a)) -> IO ()
Documentation
gflagsToWord :: (Num b, IsGFlag a) => [a] -> b Source #
packGList :: [Ptr a] -> IO (Ptr (GList (Ptr a))) Source #
Given a Haskell list of items, construct a GList with those values.
unpackGList :: Ptr (GList (Ptr a)) -> IO [Ptr a] Source #
Given a GSList construct the corresponding Haskell list.
packGSList :: [Ptr a] -> IO (Ptr (GSList (Ptr a))) Source #
Given a Haskell list of items, construct a GSList with those values.
unpackGSList :: Ptr (GSList (Ptr a)) -> IO [Ptr a] Source #
Given a GSList construct the corresponding Haskell list.
packGByteArray :: ByteString -> IO (Ptr GByteArray) Source #
unpackGByteArray :: Ptr GByteArray -> IO ByteString Source #
unrefGByteArray :: Ptr GByteArray -> IO () Source #
packGHashTable :: GHashFunc a -> GEqualFunc a -> Maybe (GDestroyNotify a) -> Maybe (GDestroyNotify b) -> [(PtrWrapped a, PtrWrapped b)] -> IO (Ptr (GHashTable a b)) Source #
unpackGHashTable :: Ptr (GHashTable a b) -> IO [(PtrWrapped a, PtrWrapped b)] Source #
unrefGHashTable :: Ptr (GHashTable a b) -> IO () Source #
packByteString :: ByteString -> IO (Ptr Word8) Source #
packZeroTerminatedByteString :: ByteString -> IO (Ptr Word8) Source #
unpackByteStringWithLength :: Integral a => a -> Ptr Word8 -> IO ByteString Source #
unpackZeroTerminatedFileNameArray :: HasCallStack => Ptr CString -> IO [String] Source #
unpackFileNameArrayWithLength :: (HasCallStack, Integral a) => a -> Ptr CString -> IO [String] Source #
unpackUTF8CArrayWithLength :: (HasCallStack, Integral a) => a -> Ptr CString -> IO [Text] Source #
unpackZeroTerminatedUTF8CArray :: HasCallStack => Ptr CString -> IO [Text] Source #
packMapZeroTerminatedStorableArray :: forall a b. (Num b, Storable b) => (a -> b) -> [a] -> IO (Ptr b) Source #
unpackMapStorableArrayWithLength :: forall a b c. (Integral a, Storable b) => (b -> c) -> a -> Ptr b -> IO [c] Source #
unpackMapZeroTerminatedStorableArray :: forall a b. (Eq a, Num a, Storable a) => (a -> b) -> Ptr a -> IO [b] Source #
packBlockArray :: Int -> [Ptr a] -> IO (Ptr a) Source #
Given a set of pointers to blocks of memory of the specified
size, copy the contents of these blocks to a freshly-allocated
(with allocBytes
) continuous area of memory.
unpackBoxedArrayWithLength :: forall a b. (Integral a, GBoxed b) => Int -> a -> Ptr b -> IO [Ptr b] Source #
cstringToString :: HasCallStack => CString -> IO String Source #
cstringToText :: HasCallStack => CString -> IO Text Source #
cstringToByteString :: HasCallStack => CString -> IO ByteString Source #