packages feed

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

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

class IDeletable a => ITAttAxis a where
        getNdivisions :: a -> IO CInt
        
        getAxisColor :: a -> IO CInt
        
        getLabelColor :: a -> IO CInt
        
        getLabelFont :: a -> IO CInt
        
        getLabelOffset :: a -> IO CDouble
        
        getLabelSize :: a -> IO CDouble
        
        getTitleOffset :: a -> IO CDouble
        
        getTitleSize :: a -> IO CDouble
        
        getTickLength :: a -> IO CDouble
        
        getTitleFont :: a -> IO CInt
        
        setNdivisions :: a -> CInt -> CInt -> IO ()
        
        setAxisColor :: a -> CInt -> IO ()
        
        setLabelColor :: a -> CInt -> IO ()
        
        setLabelFont :: a -> CInt -> IO ()
        
        setLabelOffset :: a -> CDouble -> IO ()
        
        setLabelSize :: a -> CDouble -> IO ()
        
        setTickLength :: a -> CDouble -> IO ()
        
        setTitleOffset :: a -> CDouble -> IO ()
        
        setTitleSize :: a -> CDouble -> IO ()
        
        setTitleColor :: a -> CInt -> IO ()
        
        setTitleFont :: a -> CInt -> IO ()

upcastTAttAxis :: forall a . (FPtr a, ITAttAxis a) => a -> TAttAxis
upcastTAttAxis h
  = let fh = get_fptr h
        fh2 :: Ptr RawTAttAxis = castPtr fh
      in cast_fptr_to_obj fh2

downcastTAttAxis ::
                 forall a . (FPtr a, ITAttAxis a) => TAttAxis -> a
downcastTAttAxis h
  = let fh = get_fptr h
        fh2 = castPtr fh
      in cast_fptr_to_obj fh2