gi-atk-0.2.18.12: GI/Atk/Structs/PropertyValues.hs
{- |
Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)
Note: @old_value field of #AtkPropertyValues will not contain a
valid value. This is a field defined with the purpose of contain
the previous value of the property, but is not used anymore.
-}
module GI.Atk.Structs.PropertyValues
(
-- * Exported types
PropertyValues(..) ,
noPropertyValues ,
-- * Properties
-- ** NewValue
propertyValuesReadNewValue ,
-- ** OldValue
propertyValuesReadOldValue ,
-- ** PropertyName
propertyValuesReadPropertyName ,
) 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.Atk.Types
import GI.Atk.Callbacks
newtype PropertyValues = PropertyValues (ForeignPtr PropertyValues)
noPropertyValues :: Maybe PropertyValues
noPropertyValues = Nothing
propertyValuesReadPropertyName :: PropertyValues -> IO T.Text
propertyValuesReadPropertyName s = withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 0) :: IO CString
val' <- cstringToText val
return val'
propertyValuesReadOldValue :: PropertyValues -> IO GValue
propertyValuesReadOldValue s = withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 8) :: IO (Ptr GValue)
val' <- (newBoxed GValue) val
return val'
propertyValuesReadNewValue :: PropertyValues -> IO GValue
propertyValuesReadNewValue s = withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 32) :: IO (Ptr GValue)
val' <- (newBoxed GValue) val
return val'