{- |
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 #PangoGlyphGeometry structure contains width and positioning
information for a single glyph.
-}

module GI.Pango.Structs.GlyphGeometry
    ( 

-- * Exported types
    GlyphGeometry(..)                       ,
    noGlyphGeometry                         ,


 -- * Properties
-- ** Width
    glyphGeometryReadWidth                  ,


-- ** XOffset
    glyphGeometryReadXOffset                ,


-- ** YOffset
    glyphGeometryReadYOffset                ,




    ) 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 GlyphGeometry = GlyphGeometry (ForeignPtr GlyphGeometry)
noGlyphGeometry :: Maybe GlyphGeometry
noGlyphGeometry = Nothing

glyphGeometryReadWidth :: GlyphGeometry -> IO Int32
glyphGeometryReadWidth s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO Int32
    return val

glyphGeometryReadXOffset :: GlyphGeometry -> IO Int32
glyphGeometryReadXOffset s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 4) :: IO Int32
    return val

glyphGeometryReadYOffset :: GlyphGeometry -> IO Int32
glyphGeometryReadYOffset s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 8) :: IO Int32
    return val