haskell-gi-base-0.26.0: Foundation for libraries generated by haskell-gi
Safe HaskellNone
LanguageHaskell2010

Data.GI.Base.BasicConversions

Synopsis

Documentation

gflagsToWord :: (Num b, IsGFlag a) => [a] -> b Source #

wordToGFlags :: (Storable a, Integral a, Bits a, IsGFlag b) => 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.

packGArray :: forall a. Storable a => [a] -> IO (Ptr (GArray a)) Source #

unpackGArray :: forall a. Storable a => Ptr (GArray a) -> IO [a] Source #

packMapStorableArray :: forall a b. Storable b => (a -> b) -> [a] -> IO (Ptr b) 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 #

packPtrArray :: [Ptr a] -> IO (Ptr (Ptr a)) 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 #

textToCString :: Text -> IO CString Source #

Convert Text into a CString, using the GLib allocator.

mapZeroTerminatedCArray :: (Ptr a -> IO b) -> Ptr (Ptr a) -> IO () Source #

mapCArrayWithLength :: (Storable a, Integral b) => b -> (a -> IO c) -> Ptr a -> IO () Source #

mapGArray :: forall a b. Storable a => (a -> IO b) -> Ptr (GArray a) -> IO () Source #

mapPtrArray :: (Ptr a -> IO b) -> Ptr (GPtrArray (Ptr a)) -> IO () Source #

mapGList :: (Ptr a -> IO b) -> Ptr (GList (Ptr a)) -> IO () Source #

mapGSList :: (Ptr a -> IO b) -> Ptr (GSList (Ptr a)) -> IO () Source #