{-# LANGUAGE EmptyDataDecls, ExistentialQuantification, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TApplication.Interface where import Data.Word import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Core.TApplication.RawType import HROOT.Core.TObject.Interface import HROOT.Core.TQObject.Interface class (ITObject a, ITQObject a) => ITApplication a where run :: () => a -> CBool -> IO () upcastTApplication :: forall a . (FPtr a, ITApplication a) => a -> TApplication upcastTApplication :: forall a. (FPtr a, ITApplication a) => a -> TApplication upcastTApplication 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 RawTApplication fh2 :: Ptr RawTApplication = Ptr (Raw a) -> Ptr RawTApplication forall a b. Ptr a -> Ptr b castPtr Ptr (Raw a) fh in Ptr (Raw TApplication) -> TApplication forall a. FPtr a => Ptr (Raw a) -> a cast_fptr_to_obj Ptr (Raw TApplication) Ptr RawTApplication fh2 downcastTApplication :: forall a . (FPtr a, ITApplication a) => TApplication -> a downcastTApplication :: forall a. (FPtr a, ITApplication a) => TApplication -> a downcastTApplication TApplication h = let fh :: Ptr (Raw TApplication) fh = TApplication -> Ptr (Raw TApplication) forall a. FPtr a => a -> Ptr (Raw a) get_fptr TApplication h fh2 :: Ptr (Raw a) fh2 = Ptr RawTApplication -> Ptr (Raw a) forall a b. Ptr a -> Ptr b castPtr Ptr (Raw TApplication) Ptr RawTApplication fh in Ptr (Raw a) -> a forall a. FPtr a => Ptr (Raw a) -> a cast_fptr_to_obj Ptr (Raw a) fh2