{-# LANGUAGE EmptyDataDecls, ExistentialQuantification, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies, TypeSynonymInstances #-} module OGDF.DPoint.Interface where import Data.Word import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import OGDF.DPoint.RawType import STD.Deletable.Interface class (IDeletable a) => IDPoint a where upcastDPoint :: forall a . (FPtr a, IDPoint a) => a -> DPoint upcastDPoint h = let fh = get_fptr h fh2 :: Ptr RawDPoint = castPtr fh in cast_fptr_to_obj fh2 downcastDPoint :: forall a . (FPtr a, IDPoint a) => DPoint -> a downcastDPoint h = let fh = get_fptr h fh2 = castPtr fh in cast_fptr_to_obj fh2