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

class (ITObject a, ITAttLine a) => ITView a where
        front :: () => a -> IO ()
        
        frontView :: (ITVirtualPad c0, FPtr c0) => a -> c0 -> IO ()
        
        getLatitude :: () => a -> IO CDouble
        
        getLongitude :: () => a -> IO CDouble
        
        getPsi :: () => a -> IO CDouble
        
        isViewChanged :: () => a -> IO CBool
        
        rotateView :: () => a -> CDouble -> CDouble -> IO ()
        
        setLatitude :: () => a -> CDouble -> IO ()
        
        setLongitude :: () => a -> CDouble -> IO ()
        
        setPsi :: () => a -> CDouble -> IO ()
        
        setView1 ::
                   () => a -> CDouble -> CDouble -> CDouble -> Ptr CInt -> IO ()
        
        setViewChanged :: () => a -> CBool -> IO ()
        
        side :: () => a -> IO ()
        
        sideView :: (ITVirtualPad c0, FPtr c0) => a -> c0 -> IO ()
        
        top :: () => a -> IO ()
        
        topView :: (ITVirtualPad c0, FPtr c0) => a -> c0 -> IO ()

upcastTView :: forall a . (FPtr a, ITView a) => a -> TView
upcastTView :: forall a. (FPtr a, ITView a) => a -> TView
upcastTView 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 RawTView
fh2 :: Ptr RawTView = Ptr (Raw a) -> Ptr RawTView
forall a b. Ptr a -> Ptr b
castPtr Ptr (Raw a)
fh
      in Ptr (Raw TView) -> TView
forall a. FPtr a => Ptr (Raw a) -> a
cast_fptr_to_obj Ptr (Raw TView)
Ptr RawTView
fh2

downcastTView :: forall a . (FPtr a, ITView a) => TView -> a
downcastTView :: forall a. (FPtr a, ITView a) => TView -> a
downcastTView TView
h
  = let fh :: Ptr (Raw TView)
fh = TView -> Ptr (Raw TView)
forall a. FPtr a => a -> Ptr (Raw a)
get_fptr TView
h
        fh2 :: Ptr (Raw a)
fh2 = Ptr RawTView -> Ptr (Raw a)
forall a b. Ptr a -> Ptr b
castPtr Ptr (Raw TView)
Ptr RawTView
fh
      in Ptr (Raw a) -> a
forall a. FPtr a => Ptr (Raw a) -> a
cast_fptr_to_obj Ptr (Raw a)
fh2