packages feed

HROOT-core-0.10.0.1: src/HROOT/Core/Ordinary.hs

{-# LANGUAGE FlexibleContexts, FlexibleInstances,
  ForeignFunctionInterface, InterruptibleFFI #-}
module HROOT.Core.Ordinary (getROOT, gROOT, gSystem, gStyle) where
import Foreign.C
import Foreign.Ptr
import FFICXX.Runtime.Cast
import HROOT.Core.TROOT.RawType
import HROOT.Core.TROOT.Cast
import HROOT.Core.TROOT.Interface
import HROOT.Core.TROOT.RawType
import HROOT.Core.TROOT.Cast
import HROOT.Core.TROOT.Interface
import HROOT.Core.TSystem.RawType
import HROOT.Core.TSystem.Cast
import HROOT.Core.TSystem.Interface
import HROOT.Core.TStyle.RawType
import HROOT.Core.TStyle.Cast
import HROOT.Core.TStyle.Interface

foreign import ccall interruptible
               "HROOT-coreTopLevel.h TopLevel_GetROOT" c_getroot ::
               IO (Ptr RawTROOT)

foreign import ccall interruptible
               "HROOT-coreTopLevel.h TopLevel_gROOT" c_groot :: IO (Ptr RawTROOT)

foreign import ccall interruptible
               "HROOT-coreTopLevel.h TopLevel_gSystem" c_gsystem ::
               IO (Ptr RawTSystem)

foreign import ccall interruptible
               "HROOT-coreTopLevel.h TopLevel_gStyle" c_gstyle ::
               IO (Ptr RawTStyle)

getROOT :: () => IO TROOT
getROOT = xformnull c_getroot

gROOT :: IO TROOT
gROOT = xformnull c_groot

gSystem :: IO TSystem
gSystem = xformnull c_gsystem

gStyle :: IO TStyle
gStyle = xformnull c_gstyle