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

Action to perform over a list of layers
-}

module GI.Poppler.Structs.ActionLayer
    ( 

-- * Exported types
    ActionLayer(..)                         ,
    noActionLayer                           ,


 -- * Properties
-- ** Action
    actionLayerReadAction                   ,


-- ** Layers
    actionLayerReadLayers                   ,




    ) 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.Poppler.Types
import GI.Poppler.Callbacks

newtype ActionLayer = ActionLayer (ForeignPtr ActionLayer)
noActionLayer :: Maybe ActionLayer
noActionLayer = Nothing

actionLayerReadAction :: ActionLayer -> IO ActionLayerAction
actionLayerReadAction s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO CUInt
    let val' = (toEnum . fromIntegral) val
    return val'

actionLayerReadLayers :: ActionLayer -> IO ([Ptr ()])
actionLayerReadLayers s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 8) :: IO (Ptr (GList (Ptr ())))
    val' <- unpackGList val
    return val'