{-# LANGUAGE ForeignFunctionInterface, TypeFamilies, MultiParamTypeClasses, 
             FlexibleInstances, TypeSynonymInstances, 
             EmptyDataDecls, ExistentialQuantification, ScopedTypeVariables #-}

-- module HROOT.Class.Interface where

module HROOT.Class.TPaveStats.Interface where


import Data.Word
import Foreign.ForeignPtr
import HROOT.TypeCast

import HROOT.Class.TPaveStats.RawType

import HROOT.Class.TPaveText.Interface


class (ITPaveText a) => ITPaveStats a where

instance Existable TPaveStats where
  data Exist TPaveStats = forall a. (FPtr a, ITPaveStats a) => ETPaveStats a

upcastTPaveStats :: (FPtr a, ITPaveStats a) => a -> TPaveStats
upcastTPaveStats h = let fh = get_fptr h
                         fh2 :: ForeignPtr RawTPaveStats = castForeignPtr fh
                     in cast_fptr_to_obj fh2