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

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

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

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