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

-- module HROOT.Class.Interface where

module HROOT.Class.TAttFill.Interface where


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

import HROOT.Class.TAttFill.RawType

import HROOT.Class.Deletable.Interface


class (IDeletable a) => ITAttFill a where

    setFillColor :: a -> Int -> IO () 

    setFillStyle :: a -> Int -> IO () 

instance Existable TAttFill where
  data Exist TAttFill = forall a. (FPtr a, ITAttFill a) => ETAttFill a

upcastTAttFill :: (FPtr a, ITAttFill a) => a -> TAttFill
upcastTAttFill h = let fh = get_fptr h
                       fh2 :: ForeignPtr RawTAttFill = castForeignPtr fh
                   in cast_fptr_to_obj fh2