{- | Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria (garetxe@gmail.com) The #PangoAttrLanguage structure is used to represent attributes that are languages. -} module GI.Pango.Structs.AttrLanguage ( -- * Exported types AttrLanguage(..) , noAttrLanguage , -- * Properties -- ** Attr attrLanguageReadAttr , -- ** Value attrLanguageReadValue , ) 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.Pango.Types import GI.Pango.Callbacks newtype AttrLanguage = AttrLanguage (ForeignPtr AttrLanguage) noAttrLanguage :: Maybe AttrLanguage noAttrLanguage = Nothing attrLanguageReadAttr :: AttrLanguage -> IO Attribute attrLanguageReadAttr s = withManagedPtr s $ \ptr -> do val <- peek (ptr `plusPtr` 0) :: IO (Ptr Attribute) val' <- (newPtr 16 Attribute) val return val' attrLanguageReadValue :: AttrLanguage -> IO Language attrLanguageReadValue s = withManagedPtr s $ \ptr -> do val <- peek (ptr `plusPtr` 16) :: IO (Ptr Language) val' <- (newBoxed Language) val return val'