module GI.GLib.Structs.Once
(
Once(..) ,
noOnce ,
onceReadRetval ,
onceReadStatus ,
) 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.GLib.Types
import GI.GLib.Callbacks
newtype Once = Once (ForeignPtr Once)
noOnce :: Maybe Once
noOnce = Nothing
onceReadStatus :: Once -> IO OnceStatus
onceReadStatus s = withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 0) :: IO CUInt
let val' = (toEnum . fromIntegral) val
return val'
onceReadRetval :: Once -> IO (Ptr ())
onceReadRetval s = withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 8) :: IO (Ptr ())
return val