{-# LANGUAGE EmptyDataDecls, ExistentialQuantification,
  FlexibleContexts, FlexibleInstances, ForeignFunctionInterface,
  MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies,
  TypeSynonymInstances #-}
module OGDF.GraphAttributes.Interface where
import Data.Word
import Data.Int
import Foreign.C
import Foreign.Ptr
import FFICXX.Runtime.Cast
import OGDF.GraphAttributes.RawType
import OGDF.DRect.RawType
import STD.Deletable.Interface

class (IDeletable a) => IGraphAttributes a where
        boundingBox :: () => a -> IO DRect

upcastGraphAttributes ::
                      forall a . (FPtr a, IGraphAttributes a) => a -> GraphAttributes
upcastGraphAttributes h
  = let fh = get_fptr h
        fh2 :: Ptr RawGraphAttributes = castPtr fh
      in cast_fptr_to_obj fh2

downcastGraphAttributes ::
                        forall a . (FPtr a, IGraphAttributes a) => GraphAttributes -> a
downcastGraphAttributes h
  = let fh = get_fptr h
        fh2 = castPtr fh
      in cast_fptr_to_obj fh2
