{-# LANGUAGE ForeignFunctionInterface, TypeFamilies, MultiParamTypeClasses, FlexibleInstances, TypeSynonymInstances, EmptyDataDecls, ExistentialQuantification, ScopedTypeVariables #-} -- module HROOT.Class.Interface where module HROOT.Core.TAttMarker.Interface where import Data.Word import Foreign.C import Foreign.Ptr import Foreign.ForeignPtr import FFICXX.Runtime.Cast import HROOT.Core.TAttMarker.RawType import HROOT.Core.Deletable.Interface ---- ============ ---- class (IDeletable a) => ITAttMarker a where getMarkerColor :: a -> IO CInt getMarkerStyle :: a -> IO CInt getMarkerSize :: a -> IO CDouble resetAttMarker :: a -> CString -> IO () setMarkerAttributes :: a -> IO () setMarkerColor :: a -> CInt -> IO () setMarkerStyle :: a -> CInt -> IO () setMarkerSize :: a -> CInt -> IO () instance Existable TAttMarker where data Exist TAttMarker = forall a. (FPtr a, ITAttMarker a) => ETAttMarker a upcastTAttMarker :: (FPtr a, ITAttMarker a) => a -> TAttMarker upcastTAttMarker h = let fh = get_fptr h fh2 :: ForeignPtr RawTAttMarker = castForeignPtr fh in cast_fptr_to_obj fh2 downcastTAttMarker :: (FPtr a, ITAttMarker a) => TAttMarker -> a downcastTAttMarker h = let fh = get_fptr h fh2 = castForeignPtr fh in cast_fptr_to_obj fh2