{-# LANGUAGE EmptyDataDecls, ExistentialQuantification, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies, TypeSynonymInstances #-} module HROOT.Graf.TAttImage.Interface where import Data.Word import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Graf.TAttImage.RawType import STD.Deletable.Interface class (IDeletable a) => ITAttImage a where upcastTAttImage :: forall a . (FPtr a, ITAttImage a) => a -> TAttImage upcastTAttImage :: forall a. (FPtr a, ITAttImage a) => a -> TAttImage upcastTAttImage 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 RawTAttImage fh2 :: Ptr RawTAttImage = Ptr (Raw a) -> Ptr RawTAttImage forall a b. Ptr a -> Ptr b castPtr Ptr (Raw a) fh in Ptr (Raw TAttImage) -> TAttImage forall a. FPtr a => Ptr (Raw a) -> a cast_fptr_to_obj Ptr (Raw TAttImage) Ptr RawTAttImage fh2 downcastTAttImage :: forall a . (FPtr a, ITAttImage a) => TAttImage -> a downcastTAttImage :: forall a. (FPtr a, ITAttImage a) => TAttImage -> a downcastTAttImage TAttImage h = let fh :: Ptr (Raw TAttImage) fh = TAttImage -> Ptr (Raw TAttImage) forall a. FPtr a => a -> Ptr (Raw a) get_fptr TAttImage h fh2 :: Ptr (Raw a) fh2 = Ptr RawTAttImage -> Ptr (Raw a) forall a b. Ptr a -> Ptr b castPtr Ptr (Raw TAttImage) Ptr RawTAttImage fh in Ptr (Raw a) -> a forall a. FPtr a => Ptr (Raw a) -> a cast_fptr_to_obj Ptr (Raw a) fh2