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

Deprecated
-}

module GI.Gtk.Structs.RcProperty
    ( 

-- * Exported types
    RcProperty(..)                          ,
    noRcProperty                            ,


 -- * Properties
-- ** Origin
    rcPropertyReadOrigin                    ,


-- ** PropertyName
    rcPropertyReadPropertyName              ,


-- ** TypeName
    rcPropertyReadTypeName                  ,


-- ** Value
    rcPropertyReadValue                     ,




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

newtype RcProperty = RcProperty (ForeignPtr RcProperty)
noRcProperty :: Maybe RcProperty
noRcProperty = Nothing

rcPropertyReadTypeName :: RcProperty -> IO Word32
rcPropertyReadTypeName s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO Word32
    return val

rcPropertyReadPropertyName :: RcProperty -> IO Word32
rcPropertyReadPropertyName s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 4) :: IO Word32
    return val

rcPropertyReadOrigin :: RcProperty -> IO T.Text
rcPropertyReadOrigin s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 8) :: IO CString
    val' <- cstringToText val
    return val'

rcPropertyReadValue :: RcProperty -> IO GValue
rcPropertyReadValue s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 16) :: IO (Ptr GValue)
    val' <- (newBoxed GValue) val
    return val'