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

Defines the x and y coordinates of a point.
-}

module GI.Gdk.Structs.Point
    ( 

-- * Exported types
    Point(..)                               ,
    noPoint                                 ,


 -- * Properties
-- ** X
    pointReadX                              ,


-- ** Y
    pointReadY                              ,




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

newtype Point = Point (ForeignPtr Point)
noPoint :: Maybe Point
noPoint = Nothing

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

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