{-# LINE 1 "Data/GI/Base/GHashTable.hsc" #-}
module Data.GI.Base.GHashTable
( GHashFunc
, GEqualFunc
, gDirectHash
, gDirectEqual
, ptrPackPtr
, ptrUnpackPtr
, gStrHash
, gStrEqual
, cstringPackPtr
, cstringUnpackPtr
, gvaluePackPtr
, gvalueUnpackPtr
) where
import Foreign.C
import Foreign.Ptr (Ptr, castPtr)
import Data.GI.Base.BasicTypes (PtrWrapped(..), GHashFunc, GEqualFunc)
import Data.GI.Base.GValue (GValue)
foreign import ccall "&g_direct_hash" gDirectHash :: GHashFunc (Ptr a)
foreign import ccall "&g_direct_equal" gDirectEqual :: GEqualFunc (Ptr a)
ptrPackPtr :: Ptr a -> PtrWrapped (Ptr a)
ptrPackPtr :: forall a. Ptr a -> PtrWrapped (Ptr a)
ptrPackPtr = Ptr (Ptr a) -> PtrWrapped (Ptr a)
forall a. Ptr a -> PtrWrapped a
PtrWrapped (Ptr (Ptr a) -> PtrWrapped (Ptr a))
-> (Ptr a -> Ptr (Ptr a)) -> Ptr a -> PtrWrapped (Ptr a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Ptr a -> Ptr (Ptr a)
forall a b. Ptr a -> Ptr b
castPtr
ptrUnpackPtr :: PtrWrapped (Ptr a) -> Ptr a
ptrUnpackPtr :: forall a. PtrWrapped (Ptr a) -> Ptr a
ptrUnpackPtr = Ptr (Ptr a) -> Ptr a
forall a b. Ptr a -> Ptr b
castPtr (Ptr (Ptr a) -> Ptr a)
-> (PtrWrapped (Ptr a) -> Ptr (Ptr a))
-> PtrWrapped (Ptr a)
-> Ptr a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. PtrWrapped (Ptr a) -> Ptr (Ptr a)
forall a. PtrWrapped a -> Ptr a
unwrapPtr
foreign import ccall "&g_str_hash" gStrHash :: GHashFunc CString
foreign import ccall "&g_str_equal" gStrEqual :: GEqualFunc CString
cstringPackPtr :: CString -> PtrWrapped CString
cstringPackPtr :: CString -> PtrWrapped CString
cstringPackPtr = CString -> PtrWrapped CString
forall a. Ptr a -> PtrWrapped (Ptr a)
ptrPackPtr
cstringUnpackPtr :: PtrWrapped CString -> CString
cstringUnpackPtr :: PtrWrapped CString -> CString
cstringUnpackPtr = PtrWrapped CString -> CString
forall a. PtrWrapped (Ptr a) -> Ptr a
ptrUnpackPtr
gvaluePackPtr :: Ptr GValue -> PtrWrapped (Ptr GValue)
gvaluePackPtr :: Ptr GValue -> PtrWrapped (Ptr GValue)
gvaluePackPtr = Ptr GValue -> PtrWrapped (Ptr GValue)
forall a. Ptr a -> PtrWrapped (Ptr a)
ptrPackPtr
gvalueUnpackPtr :: PtrWrapped (Ptr GValue) -> Ptr GValue
gvalueUnpackPtr :: PtrWrapped (Ptr GValue) -> Ptr GValue
gvalueUnpackPtr = PtrWrapped (Ptr GValue) -> Ptr GValue
forall a. PtrWrapped (Ptr a) -> Ptr a
ptrUnpackPtr