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

class (IDeletable a) => IDRect a where

upcastDRect :: forall a . (FPtr a, IDRect a) => a -> DRect
upcastDRect h
  = let fh = get_fptr h
        fh2 :: Ptr RawDRect = castPtr fh
      in cast_fptr_to_obj fh2

downcastDRect :: forall a . (FPtr a, IDRect a) => DRect -> a
downcastDRect h
  = let fh = get_fptr h
        fh2 = castPtr fh
      in cast_fptr_to_obj fh2
