{- | Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria (garetxe@gmail.com) A structure used to store a rectangle used by AtkText. -} module GI.Atk.Structs.TextRectangle ( -- * Exported types TextRectangle(..) , noTextRectangle , -- * Properties -- ** Height textRectangleReadHeight , -- ** Width textRectangleReadWidth , -- ** X textRectangleReadX , -- ** Y textRectangleReadY , ) 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 TextRectangle = TextRectangle (ForeignPtr TextRectangle) noTextRectangle :: Maybe TextRectangle noTextRectangle = Nothing textRectangleReadX :: TextRectangle -> IO Int32 textRectangleReadX s = withManagedPtr s $ \ptr -> do val <- peek (ptr `plusPtr` 0) :: IO Int32 return val textRectangleReadY :: TextRectangle -> IO Int32 textRectangleReadY s = withManagedPtr s $ \ptr -> do val <- peek (ptr `plusPtr` 4) :: IO Int32 return val textRectangleReadWidth :: TextRectangle -> IO Int32 textRectangleReadWidth s = withManagedPtr s $ \ptr -> do val <- peek (ptr `plusPtr` 8) :: IO Int32 return val textRectangleReadHeight :: TextRectangle -> IO Int32 textRectangleReadHeight s = withManagedPtr s $ \ptr -> do val <- peek (ptr `plusPtr` 12) :: IO Int32 return val