packages feed

HROOT-graf-0.9: src/HROOT/Graf/TEllipse/Interface.hs

{-# LANGUAGE EmptyDataDecls, ExistentialQuantification,
  FlexibleContexts, FlexibleInstances, ForeignFunctionInterface,
  MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies,
  TypeSynonymInstances #-}
module HROOT.Graf.TEllipse.Interface where
import Data.Word
import Foreign.C
import Foreign.Ptr
import FFICXX.Runtime.Cast
import HROOT.Graf.TEllipse.RawType
import HROOT.Core.TObject.Interface
import HROOT.Core.TAttLine.Interface
import HROOT.Core.TAttFill.Interface

class (ITObject a, ITAttLine a, ITAttFill a) => ITEllipse a

upcastTEllipse :: forall a . (FPtr a, ITEllipse a) => a -> TEllipse
upcastTEllipse h
  = let fh = get_fptr h
        fh2 :: Ptr RawTEllipse = castPtr fh
      in cast_fptr_to_obj fh2

downcastTEllipse ::
                 forall a . (FPtr a, ITEllipse a) => TEllipse -> a
downcastTEllipse h
  = let fh = get_fptr h
        fh2 = castPtr fh
      in cast_fptr_to_obj fh2