packages feed

HROOT-core-0.9: src/HROOT/Core/TAttLine/Interface.hs

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

class IDeletable a => ITAttLine a where
        getLineColor :: a -> IO CInt
        
        getLineStyle :: a -> IO CInt
        
        getLineWidth :: a -> IO CInt
        
        resetAttLine :: Castable c0 CString => a -> c0 -> IO ()
        
        setLineAttributes :: a -> IO ()
        
        setLineColor :: a -> CInt -> IO ()
        
        setLineStyle :: a -> CInt -> IO ()
        
        setLineWidth :: a -> CInt -> IO ()

upcastTAttLine :: forall a . (FPtr a, ITAttLine a) => a -> TAttLine
upcastTAttLine h
  = let fh = get_fptr h
        fh2 :: Ptr RawTAttLine = castPtr fh
      in cast_fptr_to_obj fh2

downcastTAttLine ::
                 forall a . (FPtr a, ITAttLine a) => TAttLine -> a
downcastTAttLine h
  = let fh = get_fptr h
        fh2 = castPtr fh
      in cast_fptr_to_obj fh2