module GI.GObject.Unions.TypeCValue
(
TypeCValue(..) ,
noTypeCValue ,
typeCValueReadVDouble ,
typeCValueReadVInt ,
typeCValueReadVInt64 ,
typeCValueReadVLong ,
typeCValueReadVPointer ,
) where
import Prelude ()
import Data.GI.Base.ShortPrelude
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import GI.GObject.Types
import GI.GObject.Callbacks
newtype TypeCValue = TypeCValue (ForeignPtr TypeCValue)
noTypeCValue :: Maybe TypeCValue
noTypeCValue = Nothing
typeCValueReadVInt :: TypeCValue -> IO Int32
typeCValueReadVInt s = withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 0) :: IO Int32
return val
typeCValueReadVLong :: TypeCValue -> IO Int64
typeCValueReadVLong s = withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 0) :: IO Int64
return val
typeCValueReadVInt64 :: TypeCValue -> IO Int64
typeCValueReadVInt64 s = withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 0) :: IO Int64
return val
typeCValueReadVDouble :: TypeCValue -> IO Double
typeCValueReadVDouble s = withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 0) :: IO CDouble
let val' = realToFrac val
return val'
typeCValueReadVPointer :: TypeCValue -> IO (Ptr ())
typeCValueReadVPointer s = withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 0) :: IO (Ptr ())
return val