{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)

Each piece of memory that is pushed onto the stack
is cast to a GTrashStack*.
-}

module GI.GLib.Structs.TrashStack
    ( 

-- * Exported types
    TrashStack(..)                          ,
    noTrashStack                            ,


 -- * Properties
-- ** Next
    trashStackReadNext                      ,




    ) 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 TrashStack = TrashStack (ForeignPtr TrashStack)
noTrashStack :: Maybe TrashStack
noTrashStack = Nothing

trashStackReadNext :: TrashStack -> IO TrashStack
trashStackReadNext s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO (Ptr TrashStack)
    val' <- (newPtr 8 TrashStack) val
    return val'