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

class (ITObject a, ITAttLine a) => ITLine a where
        drawLine ::
                   () => a -> CDouble -> CDouble -> CDouble -> CDouble -> IO TLine
        
        drawLineNDC ::
                      () => a -> CDouble -> CDouble -> CDouble -> CDouble -> IO TLine
        
        paintLine ::
                    () => a -> CDouble -> CDouble -> CDouble -> CDouble -> IO ()
        
        paintLineNDC ::
                       () => a -> CDouble -> CDouble -> CDouble -> CDouble -> IO ()
        
        setX1 :: () => a -> CDouble -> IO ()
        
        setX2 :: () => a -> CDouble -> IO ()
        
        setY1 :: () => a -> CDouble -> IO ()
        
        setY2 :: () => a -> CDouble -> IO ()

upcastTLine :: forall a . (FPtr a, ITLine a) => a -> TLine
upcastTLine :: forall a. (FPtr a, ITLine a) => a -> TLine
upcastTLine 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 RawTLine
fh2 :: Ptr RawTLine = Ptr (Raw a) -> Ptr RawTLine
forall a b. Ptr a -> Ptr b
castPtr Ptr (Raw a)
fh
      in Ptr (Raw TLine) -> TLine
forall a. FPtr a => Ptr (Raw a) -> a
cast_fptr_to_obj Ptr (Raw TLine)
Ptr RawTLine
fh2

downcastTLine :: forall a . (FPtr a, ITLine a) => TLine -> a
downcastTLine :: forall a. (FPtr a, ITLine a) => TLine -> a
downcastTLine TLine
h
  = let fh :: Ptr (Raw TLine)
fh = TLine -> Ptr (Raw TLine)
forall a. FPtr a => a -> Ptr (Raw a)
get_fptr TLine
h
        fh2 :: Ptr (Raw a)
fh2 = Ptr RawTLine -> Ptr (Raw a)
forall a b. Ptr a -> Ptr b
castPtr Ptr (Raw TLine)
Ptr RawTLine
fh
      in Ptr (Raw a) -> a
forall a. FPtr a => Ptr (Raw a) -> a
cast_fptr_to_obj Ptr (Raw a)
fh2