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