{-# LANGUAGE EmptyDataDecls, ExistentialQuantification, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TColor.Interface where import Data.Word import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Core.TColor.RawType import HROOT.Core.TNamed.Interface class (ITNamed a) => ITColor a where upcastTColor :: forall a . (FPtr a, ITColor a) => a -> TColor upcastTColor h = let fh = get_fptr h fh2 :: Ptr RawTColor = castPtr fh in cast_fptr_to_obj fh2 downcastTColor :: forall a . (FPtr a, ITColor a) => TColor -> a downcastTColor h = let fh = get_fptr h fh2 = castPtr fh in cast_fptr_to_obj fh2