{-# LANGUAGE EmptyDataDecls, ExistentialQuantification,
  FlexibleContexts, FlexibleInstances, ForeignFunctionInterface,
  MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies,
  TypeSynonymInstances #-}
module HROOT.Hist.TGraph.Interface where
import Data.Word
import Data.Int
import Foreign.C
import Foreign.Ptr
import FFICXX.Runtime.Cast
import HROOT.Hist.TGraph.RawType
import HROOT.Core.TNamed.Interface
import HROOT.Core.TAttLine.Interface
import HROOT.Core.TAttFill.Interface
import HROOT.Core.TAttMarker.Interface
import HROOT.Hist.TF1.Interface
import HROOT.Hist.TH1F.Interface

class (ITNamed a, ITAttLine a, ITAttFill a, ITAttMarker a) =>
      ITGraph a where
        apply :: (ITF1 c0, FPtr c0) => a -> c0 -> IO ()
        
        chisquare :: (ITF1 c0, FPtr c0) => a -> c0 -> IO CDouble
        
        drawGraph ::
                    (Castable c0 CString) =>
                    a -> CInt -> Ptr CDouble -> Ptr CDouble -> c0 -> IO ()
        
        drawPanelTGraph :: () => a -> IO ()
        
        expand :: () => a -> CInt -> CInt -> IO ()
        
        fitPanelTGraph :: () => a -> IO ()
        
        getCorrelationFactorTGraph :: () => a -> IO CDouble
        
        getCovarianceTGraph :: () => a -> IO CDouble
        
        getMeanTGraph :: () => a -> CInt -> IO CDouble
        
        getRMSTGraph :: () => a -> CInt -> IO CDouble
        
        getErrorX :: () => a -> CInt -> IO CDouble
        
        getErrorY :: () => a -> CInt -> IO CDouble
        
        getErrorXhigh :: () => a -> CInt -> IO CDouble
        
        getErrorXlow :: () => a -> CInt -> IO CDouble
        
        getErrorYhigh :: () => a -> CInt -> IO CDouble
        
        getErrorYlow :: () => a -> CInt -> IO CDouble
        
        initExpo :: () => a -> CDouble -> CDouble -> IO ()
        
        initGaus :: () => a -> CDouble -> CDouble -> IO ()
        
        initPolynom :: () => a -> CDouble -> CDouble -> IO ()
        
        insertPoint :: () => a -> IO CInt
        
        integralTGraph :: () => a -> CInt -> CInt -> IO CDouble
        
        isEditable :: () => a -> IO CBool
        
        isInsideTGraph :: () => a -> CDouble -> CDouble -> IO CInt
        
        leastSquareFit ::
                         () => a -> CInt -> Ptr CDouble -> CDouble -> CDouble -> IO ()
        
        paintStats :: (ITF1 c0, FPtr c0) => a -> c0 -> IO ()
        
        removePoint :: () => a -> CInt -> IO CInt
        
        setEditable :: () => a -> CBool -> IO ()
        
        setHistogram :: (ITH1F c0, FPtr c0) => a -> c0 -> IO ()
        
        setMaximumTGraph :: () => a -> CDouble -> IO ()
        
        setMinimumTGraph :: () => a -> CDouble -> IO ()
        
        set :: () => a -> CInt -> IO ()
        
        setPoint :: () => a -> CInt -> CDouble -> CDouble -> IO ()

upcastTGraph :: forall a . (FPtr a, ITGraph a) => a -> TGraph
upcastTGraph :: forall a. (FPtr a, ITGraph a) => a -> TGraph
upcastTGraph 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 RawTGraph
fh2 :: Ptr RawTGraph = Ptr (Raw a) -> Ptr RawTGraph
forall a b. Ptr a -> Ptr b
castPtr Ptr (Raw a)
fh
      in Ptr (Raw TGraph) -> TGraph
forall a. FPtr a => Ptr (Raw a) -> a
cast_fptr_to_obj Ptr (Raw TGraph)
Ptr RawTGraph
fh2

downcastTGraph :: forall a . (FPtr a, ITGraph a) => TGraph -> a
downcastTGraph :: forall a. (FPtr a, ITGraph a) => TGraph -> a
downcastTGraph TGraph
h
  = let fh :: Ptr (Raw TGraph)
fh = TGraph -> Ptr (Raw TGraph)
forall a. FPtr a => a -> Ptr (Raw a)
get_fptr TGraph
h
        fh2 :: Ptr (Raw a)
fh2 = Ptr RawTGraph -> Ptr (Raw a)
forall a b. Ptr a -> Ptr b
castPtr Ptr (Raw TGraph)
Ptr RawTGraph
fh
      in Ptr (Raw a) -> a
forall a. FPtr a => Ptr (Raw a) -> a
cast_fptr_to_obj Ptr (Raw a)
fh2