{- | 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 #PangoAttrFontDesc structure is used to store an attribute that sets all aspects of the font description at once. -} module GI.Pango.Structs.AttrFontDesc ( -- * Exported types AttrFontDesc(..) , noAttrFontDesc , -- * Properties -- ** Attr attrFontDescReadAttr , -- ** Desc attrFontDescReadDesc , ) 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 AttrFontDesc = AttrFontDesc (ForeignPtr AttrFontDesc) noAttrFontDesc :: Maybe AttrFontDesc noAttrFontDesc = Nothing attrFontDescReadAttr :: AttrFontDesc -> IO Attribute attrFontDescReadAttr s = withManagedPtr s $ \ptr -> do val <- peek (ptr `plusPtr` 0) :: IO (Ptr Attribute) val' <- (newPtr 16 Attribute) val return val' attrFontDescReadDesc :: AttrFontDesc -> IO FontDescription attrFontDescReadDesc s = withManagedPtr s $ \ptr -> do val <- peek (ptr `plusPtr` 16) :: IO (Ptr FontDescription) val' <- (newBoxed FontDescription) val return val'