packages feed

HROOT-graf 0.9.0.1 → 0.10.0.1

raw patch · 164 files changed

+4895/−2123 lines, 164 filesdep +stdcxxdep ~HROOT-coredep ~HROOT-histdep ~fficxxsetup-changed

Dependencies added: stdcxx

Dependency ranges changed: HROOT-core, HROOT-hist, fficxx, fficxx-runtime

Files

+ CHANGES view
@@ -0,0 +1,60 @@+# Changelog for HROOT++## 0.10.0.1+- Use hackage-version of fficxx (#18)+- Generate docs in CI (#17)+- Update flake.nix with recent fficxx and ormolu format (#16)+- Update fficxx to support GHC 9.4 (#15)+- Add TMutex and test multithreading with GUI (#12)+- HROOT now uses common stdcxx (#11)+- idealized gas simulation (#10)+- Add TMarker and Range. Test 2D graphics using gas example (#9)+- HROOT generation and packing via nix (#8)+- Revive umbrella package generation (#7)+- Static files (Config.hs, Setup.lhs) and custom-setup dependency (#6)+- Modernize HROOT with fficxx 0.5.1 (#5)++## 0.9.0.1++## 0.9+- HROOT-tree+- HROOT only support ROOT > 6++## 0.8+- separate packages into HROOT-core, HROOT-hist, HROOT-io, HROOT-math, HROOT-graf and HROOT is now an umbrella package++## 0.7+- separate all class interfaces and implementation in different modules+- overhaul Existential++## 0.7.1+- support for static methods+- add TROOT++## 0.6.9+- implement almost all class methods of TLine, TAttLine, TAttMarker, TAttText and TAttPad++## 0.6.8+- implement almost all class methods of TH2, TH3, TFormula, TF1 and TGraph++## 0.6.7+- implement almost all TH1 class methods++## 0.6.6+- do not need OverlappingInstances, IncoherentInstances, UndecidableInstances++## 0.6.4+- add many TH2 class methods++## 0.6.3+- Implement Existential Types++## 0.6+- implement Deletable. delete method for every object+- refactor HROOT generated file names (Interface.hs, Implementation.hs, FFI.hs)++## 0.5.1+- support for delete++## 0.5.0+- initial preview release
− Config.hs
@@ -1,85 +0,0 @@-{-# LANGUAGE ScopedTypeVariables #-}--module Config where- -import Distribution.Simple-import Distribution.Simple.Setup-import Distribution.PackageDescription-import Distribution.Simple.LocalBuildInfo--import System.Exit-import System.Process--config :: LocalBuildInfo -> IO (Maybe HookedBuildInfo)-config bInfo = do -  (excode, out, err) <- readProcessWithExitCode "root-config" ["--glibs"] ""-  liboptset' <- case excode of -                  ExitSuccess -> do  -                    return . Just .  mkLibraryOptionSet . words $ out-                  _ -> do -                    putStrLn $ "root-config failure but I am installing HROOT without ROOT. It will not work. This is only for documentation." -                    return Nothing              -  (excode2,out2,err2) <- readProcessWithExitCode "root-config" ["--incdir"] ""-  incdir' <- case excode2 of -               ExitSuccess -> do  -                 return . Just . head . words $ out2-               _ -> do -                 putStrLn $ "root-config failure but I am installing HROOT without ROOT. It will not work. This is only for documentation." -                 return Nothing-  let Just lib = library . localPkgDescr $ bInfo-      buildinfo = libBuildInfo lib-  let (r :: Maybe HookedBuildInfo) = case liboptset' of -            Nothing -> Nothing-            Just liboptset -> -              case incdir' of -                Nothing -> Nothing -                Just incdir -> -                  let hbi = emptyBuildInfo { extraLibs = extraLibs buildinfo -                                                         ++ libs liboptset-                                           , extraLibDirs = libdirs liboptset -                                           , includeDirs = incdir : includeDirs buildinfo-                                           }-                  in Just (Just hbi, []) -  return r ---data LibraryOptionSet = LibraryOptionSet { -  libs :: [String], -  libdirs :: [String], -  libopts :: [String]-} deriving Show--data LibraryOption = Lib String -                   | Dir String-                   | Opt String -                   deriving Show--mkLibraryOptionSet :: [String] -> LibraryOptionSet-mkLibraryOptionSet strs = let opts = libraryOptions strs-                          in  foldr f (LibraryOptionSet [] [] []) opts -  where f x (LibraryOptionSet l d o) = case x of-                                         Lib st -> LibraryOptionSet (st:l) d o -                                         Dir st -> LibraryOptionSet l (st:d) o -                                         Opt st -> LibraryOptionSet l d (st:o) --libraryOptions :: [String] -> [LibraryOption] -- LibraryOptionSet -libraryOptions = map f -  where f x = let r = parseLibraryOptionClassifier x-              in  case r of -                    Left msg -> error (show msg)-                    Right result -> result---parseLibraryOptionClassifier :: String -> Either String LibraryOption -parseLibraryOptionClassifier [] = Left "empty option"-parseLibraryOptionClassifier str@(x:xs) = -  case x of-    '-' -> if null xs -             then Left "parse error"-             else let (y:ys) = xs-                  in  case y of-                        'L' -> Right (Dir ys)-                        'l' -> Right (Lib ys)-                        _ -> Right (Opt str)-    _ -> Right (Opt str) -
HROOT-graf.cabal view
@@ -1,68 +1,85 @@-Name:                HROOT-graf-Version:     0.9.0.1-Synopsis:    Haskell binding to ROOT Graf modules-Description:         HROOT is a haskell Foreign Function Interface (FFI) binding to ROOT. ROOT(http://root.cern.ch) is an object-oriented program and library developed by CERN for physics data analysis.-Homepage:       http://ianwookim.org/HROOT-license: LGPL-2.1-license-file: LICENSE-Author:              Ian-Woo Kim-Maintainer:  Ian-Woo Kim <ianwookim@gmail.com>-Category:       Graphics, Statistics, Math, Numerical-Tested-with:    GHC >= 7.6-Build-Type:  Custom-cabal-version:  >=1.10+Cabal-version: 3.0+Name:          HROOT-graf+Version:       0.10.0.1+Synopsis:      Haskell binding to ROOT Graf modules+Description:+  HROOT is a haskell Foreign Function Interface (FFI) binding to ROOT.+  ROOT(http://root.cern.ch) is an object-oriented program and library+  developed by CERN for physics data analysis.+Homepage:      https://wavewave.github.io/HROOT+license:       LGPL-2.1-or-later+license-file:  LICENSE+Author:        Ian-Woo Kim+Maintainer:    Ian-Woo Kim <ianwookim@gmail.com>+Category:      Graphics, Statistics, Math, Numerical+Tested-with:   GHC == 9.0.2 || == 9.2.4 || == 9.4.2  Extra-source-files:-                       Config.hs-                       csrc/HROOTGrafTArc.h-                       csrc/HROOTGrafTArrow.h-                       csrc/HROOTGrafTAttImage.h-                       csrc/HROOTGrafTBRIK.h-                       csrc/HROOTGrafTCanvas.h-                       csrc/HROOTGrafTCrown.h-                       csrc/HROOTGrafTCutG.h-                       csrc/HROOTGrafTEllipse.h-                       csrc/HROOTGrafTGaxis.h-                       csrc/HROOTGrafTGraphPolar.h-                       csrc/HROOTGrafTGraphQQ.h-                       csrc/HROOTGrafTLine.h-                       csrc/HROOTGrafTPad.h-                       csrc/HROOTGrafTPCON.h-                       csrc/HROOTGrafTShape.h-                       csrc/HROOTGrafTSPHE.h-                       csrc/HROOTGrafTTUBE.h-                       csrc/HROOTGrafTArc.cpp-                       csrc/HROOTGrafTArrow.cpp-                       csrc/HROOTGrafTAttImage.cpp-                       csrc/HROOTGrafTBRIK.cpp-                       csrc/HROOTGrafTCanvas.cpp-                       csrc/HROOTGrafTCrown.cpp-                       csrc/HROOTGrafTCutG.cpp-                       csrc/HROOTGrafTEllipse.cpp-                       csrc/HROOTGrafTGaxis.cpp-                       csrc/HROOTGrafTGraphPolar.cpp-                       csrc/HROOTGrafTGraphQQ.cpp-                       csrc/HROOTGrafTLine.cpp-                       csrc/HROOTGrafTPad.cpp-                       csrc/HROOTGrafTPCON.cpp-                       csrc/HROOTGrafTShape.cpp-                       csrc/HROOTGrafTSPHE.cpp-                       csrc/HROOTGrafTTUBE.cpp--+  CHANGES+  csrc/HROOTGrafTArc.h+  csrc/HROOTGrafTArrow.h+  csrc/HROOTGrafTAttImage.h+  csrc/HROOTGrafTBox.h+  csrc/HROOTGrafTBRIK.h+  csrc/HROOTGrafTCanvas.h+  csrc/HROOTGrafTCrown.h+  csrc/HROOTGrafTCutG.h+  csrc/HROOTGrafTEllipse.h+  csrc/HROOTGrafTGaxis.h+  csrc/HROOTGrafTGraphPolar.h+  csrc/HROOTGrafTGraphQQ.h+  csrc/HROOTGrafTLine.h+  csrc/HROOTGrafTMarker.h+  csrc/HROOTGrafTPad.h+  csrc/HROOTGrafTPCON.h+  csrc/HROOTGrafTShape.h+  csrc/HROOTGrafTSPHE.h+  csrc/HROOTGrafTTUBE.h+  csrc/HROOTGrafTView.h+  csrc/HROOTGrafTView3D.h+  csrc/HROOTGrafTArc.cpp+  csrc/HROOTGrafTArrow.cpp+  csrc/HROOTGrafTAttImage.cpp+  csrc/HROOTGrafTBox.cpp+  csrc/HROOTGrafTBRIK.cpp+  csrc/HROOTGrafTCanvas.cpp+  csrc/HROOTGrafTCrown.cpp+  csrc/HROOTGrafTCutG.cpp+  csrc/HROOTGrafTEllipse.cpp+  csrc/HROOTGrafTGaxis.cpp+  csrc/HROOTGrafTGraphPolar.cpp+  csrc/HROOTGrafTGraphQQ.cpp+  csrc/HROOTGrafTLine.cpp+  csrc/HROOTGrafTMarker.cpp+  csrc/HROOTGrafTPad.cpp+  csrc/HROOTGrafTPCON.cpp+  csrc/HROOTGrafTShape.cpp+  csrc/HROOTGrafTSPHE.cpp+  csrc/HROOTGrafTTUBE.cpp+  csrc/HROOTGrafTView.cpp+  csrc/HROOTGrafTView3D.cpp+Build-Type: Custom+custom-setup+  setup-depends: Cabal < 4, base > 4 && < 5, process +Source-repository head+  type:     git+  location: https://github.com/wavewave/HROOT  Library   default-language: Haskell2010   hs-source-dirs: src   ghc-options:  -Wall -funbox-strict-fields -fno-warn-unused-do-bind -fno-warn-orphans -fno-warn-unused-imports-  ghc-prof-options: -caf-all -auto-all-  cc-options: -std=c++14-  Build-Depends:      base>4 && < 5, fficxx >= 0.3, fficxx-runtime >= 0.3, template-haskell,HROOT-core,HROOT-hist+  cxx-options: -std=c++17+  Build-Depends: base > 4 && < 5, fficxx >= 0.7, fficxx-runtime >= 0.7, template-haskell, stdcxx, HROOT-core == 0.10.0.1, HROOT-hist == 0.10.0.1   Exposed-Modules:                        HROOT.Graf+                       HROOT.Graf.Ordinary+                       HROOT.Graf.Template+                       HROOT.Graf.TH                        HROOT.Graf.TArc                        HROOT.Graf.TArrow                        HROOT.Graf.TAttImage+                       HROOT.Graf.TBox                        HROOT.Graf.TBRIK                        HROOT.Graf.TCanvas                        HROOT.Graf.TCrown@@ -72,14 +89,18 @@                        HROOT.Graf.TGraphPolar                        HROOT.Graf.TGraphQQ                        HROOT.Graf.TLine+                       HROOT.Graf.TMarker                        HROOT.Graf.TPad                        HROOT.Graf.TPCON                        HROOT.Graf.TShape                        HROOT.Graf.TSPHE                        HROOT.Graf.TTUBE+                       HROOT.Graf.TView+                       HROOT.Graf.TView3D                        HROOT.Graf.TArc.RawType                        HROOT.Graf.TArrow.RawType                        HROOT.Graf.TAttImage.RawType+                       HROOT.Graf.TBox.RawType                        HROOT.Graf.TBRIK.RawType                        HROOT.Graf.TCanvas.RawType                        HROOT.Graf.TCrown.RawType@@ -89,14 +110,18 @@                        HROOT.Graf.TGraphPolar.RawType                        HROOT.Graf.TGraphQQ.RawType                        HROOT.Graf.TLine.RawType+                       HROOT.Graf.TMarker.RawType                        HROOT.Graf.TPad.RawType                        HROOT.Graf.TPCON.RawType                        HROOT.Graf.TShape.RawType                        HROOT.Graf.TSPHE.RawType                        HROOT.Graf.TTUBE.RawType+                       HROOT.Graf.TView.RawType+                       HROOT.Graf.TView3D.RawType                        HROOT.Graf.TArc.FFI                        HROOT.Graf.TArrow.FFI                        HROOT.Graf.TAttImage.FFI+                       HROOT.Graf.TBox.FFI                        HROOT.Graf.TBRIK.FFI                        HROOT.Graf.TCanvas.FFI                        HROOT.Graf.TCrown.FFI@@ -106,14 +131,18 @@                        HROOT.Graf.TGraphPolar.FFI                        HROOT.Graf.TGraphQQ.FFI                        HROOT.Graf.TLine.FFI+                       HROOT.Graf.TMarker.FFI                        HROOT.Graf.TPad.FFI                        HROOT.Graf.TPCON.FFI                        HROOT.Graf.TShape.FFI                        HROOT.Graf.TSPHE.FFI                        HROOT.Graf.TTUBE.FFI+                       HROOT.Graf.TView.FFI+                       HROOT.Graf.TView3D.FFI                        HROOT.Graf.TArc.Interface                        HROOT.Graf.TArrow.Interface                        HROOT.Graf.TAttImage.Interface+                       HROOT.Graf.TBox.Interface                        HROOT.Graf.TBRIK.Interface                        HROOT.Graf.TCanvas.Interface                        HROOT.Graf.TCrown.Interface@@ -123,14 +152,18 @@                        HROOT.Graf.TGraphPolar.Interface                        HROOT.Graf.TGraphQQ.Interface                        HROOT.Graf.TLine.Interface+                       HROOT.Graf.TMarker.Interface                        HROOT.Graf.TPad.Interface                        HROOT.Graf.TPCON.Interface                        HROOT.Graf.TShape.Interface                        HROOT.Graf.TSPHE.Interface                        HROOT.Graf.TTUBE.Interface+                       HROOT.Graf.TView.Interface+                       HROOT.Graf.TView3D.Interface                        HROOT.Graf.TArc.Cast                        HROOT.Graf.TArrow.Cast                        HROOT.Graf.TAttImage.Cast+                       HROOT.Graf.TBox.Cast                        HROOT.Graf.TBRIK.Cast                        HROOT.Graf.TCanvas.Cast                        HROOT.Graf.TCrown.Cast@@ -140,14 +173,18 @@                        HROOT.Graf.TGraphPolar.Cast                        HROOT.Graf.TGraphQQ.Cast                        HROOT.Graf.TLine.Cast+                       HROOT.Graf.TMarker.Cast                        HROOT.Graf.TPad.Cast                        HROOT.Graf.TPCON.Cast                        HROOT.Graf.TShape.Cast                        HROOT.Graf.TSPHE.Cast                        HROOT.Graf.TTUBE.Cast+                       HROOT.Graf.TView.Cast+                       HROOT.Graf.TView3D.Cast                        HROOT.Graf.TArc.Implementation                        HROOT.Graf.TArrow.Implementation                        HROOT.Graf.TAttImage.Implementation+                       HROOT.Graf.TBox.Implementation                        HROOT.Graf.TBRIK.Implementation                        HROOT.Graf.TCanvas.Implementation                        HROOT.Graf.TCrown.Implementation@@ -157,22 +194,25 @@                        HROOT.Graf.TGraphPolar.Implementation                        HROOT.Graf.TGraphQQ.Implementation                        HROOT.Graf.TLine.Implementation+                       HROOT.Graf.TMarker.Implementation                        HROOT.Graf.TPad.Implementation                        HROOT.Graf.TPCON.Implementation                        HROOT.Graf.TShape.Implementation                        HROOT.Graf.TSPHE.Implementation                        HROOT.Graf.TTUBE.Implementation-+                       HROOT.Graf.TView.Implementation+                       HROOT.Graf.TView3D.Implementation   Other-Modules:-   extra-lib-dirs: -  extra-libraries:    stdc++ +  extra-libraries:       Include-dirs:       csrc +  pkgconfig-depends:    Install-includes:                        HROOT-grafType.h                        HROOTGrafTArc.h                        HROOTGrafTArrow.h                        HROOTGrafTAttImage.h+                       HROOTGrafTBox.h                        HROOTGrafTBRIK.h                        HROOTGrafTCanvas.h                        HROOTGrafTCrown.h@@ -182,16 +222,19 @@                        HROOTGrafTGraphPolar.h                        HROOTGrafTGraphQQ.h                        HROOTGrafTLine.h+                       HROOTGrafTMarker.h                        HROOTGrafTPad.h                        HROOTGrafTPCON.h                        HROOTGrafTShape.h                        HROOTGrafTSPHE.h                        HROOTGrafTTUBE.h--  C-sources:+                       HROOTGrafTView.h+                       HROOTGrafTView3D.h+  Cxx-sources:                        csrc/HROOTGrafTArc.cpp                        csrc/HROOTGrafTArrow.cpp                        csrc/HROOTGrafTAttImage.cpp+                       csrc/HROOTGrafTBox.cpp                        csrc/HROOTGrafTBRIK.cpp                        csrc/HROOTGrafTCanvas.cpp                        csrc/HROOTGrafTCrown.cpp@@ -201,10 +244,12 @@                        csrc/HROOTGrafTGraphPolar.cpp                        csrc/HROOTGrafTGraphQQ.cpp                        csrc/HROOTGrafTLine.cpp+                       csrc/HROOTGrafTMarker.cpp                        csrc/HROOTGrafTPad.cpp                        csrc/HROOTGrafTPCON.cpp                        csrc/HROOTGrafTShape.cpp                        csrc/HROOTGrafTSPHE.cpp                        csrc/HROOTGrafTTUBE.cpp-+                       csrc/HROOTGrafTView.cpp+                       csrc/HROOTGrafTView3D.cpp 
+ Setup.hs view
@@ -0,0 +1,27 @@+import Distribution.Simple+import Distribution.Simple.Setup+import Distribution.PackageDescription+import Distribution.Simple.LocalBuildInfo+import Config++myconfigHook = simpleUserHooks { confHook = hookfunction }++hookfunction x y = do+  binfo <- confHook simpleUserHooks x y+  r_pbi <- config binfo+  let pkg_descr = localPkgDescr binfo++  let newbinfo = case r_pbi of+                   Just pbi ->  binfo { localPkgDescr = updatePackageDescription pbi pkg_descr }+                   Nothing -> do+                     let r_lib = library pkg_descr+                     case r_lib of+                       Just lib ->+                         let binfo2 = libBuildInfo lib+                             newlib = lib { libBuildInfo = binfo2 { cSources = [] }}+                          in  binfo { localPkgDescr = pkg_descr { library = Just newlib }}+                       Nothing -> error "some library setting is wrong."+--   putStrLn (show (localPkgDescr newbinfo))+  return newbinfo++main = defaultMainWithHooks myconfigHook
− Setup.lhs
@@ -1,33 +0,0 @@-#! /usr/bin/env runhaskell-  -> import Distribution.Simple-> import Distribution.Simple.Setup-> import Distribution.PackageDescription-> import Distribution.Simple.LocalBuildInfo->-> import Config->-> myconfigHook = simpleUserHooks { confHook = hookfunction } ->-> hookfunction x y = do ->   binfo <- confHook simpleUserHooks x y ->   r_pbi <- config binfo->   let pkg_descr = localPkgDescr binfo->   ->   let newbinfo = case r_pbi of ->                    Just pbi ->  binfo { localPkgDescr = updatePackageDescription pbi pkg_descr }->                    Nothing -> do ->                      let r_lib = library pkg_descr ->                      case r_lib of->                        Just lib ->  ->                          let binfo2 = libBuildInfo lib->                              newlib = lib { libBuildInfo = binfo2 { cSources = [] }}  ->                          in  binfo { localPkgDescr = pkg_descr { library = Just newlib }}  ->                        Nothing -> error "some library setting is wrong." -> --   putStrLn (show (localPkgDescr newbinfo))->   return newbinfo->  ->-> main = defaultMainWithHooks myconfigHook->-
csrc/HROOT-grafType.h view
@@ -1,114 +1,52 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_GRAF__-#define __HROOT_GRAF__--// Opaque type definition for TArc -typedef struct TArc_tag TArc_t; -typedef TArc_t * TArc_p; -typedef TArc_t const* const_TArc_p; ---// Opaque type definition for TArrow -typedef struct TArrow_tag TArrow_t; -typedef TArrow_t * TArrow_p; -typedef TArrow_t const* const_TArrow_p; ---// Opaque type definition for TAttImage -typedef struct TAttImage_tag TAttImage_t; -typedef TAttImage_t * TAttImage_p; -typedef TAttImage_t const* const_TAttImage_p; ---// Opaque type definition for TBRIK -typedef struct TBRIK_tag TBRIK_t; -typedef TBRIK_t * TBRIK_p; -typedef TBRIK_t const* const_TBRIK_p; ---// Opaque type definition for TCanvas -typedef struct TCanvas_tag TCanvas_t; -typedef TCanvas_t * TCanvas_p; -typedef TCanvas_t const* const_TCanvas_p; ---// Opaque type definition for TCrown -typedef struct TCrown_tag TCrown_t; -typedef TCrown_t * TCrown_p; -typedef TCrown_t const* const_TCrown_p; ---// Opaque type definition for TCutG -typedef struct TCutG_tag TCutG_t; -typedef TCutG_t * TCutG_p; -typedef TCutG_t const* const_TCutG_p; ---// Opaque type definition for TEllipse -typedef struct TEllipse_tag TEllipse_t; -typedef TEllipse_t * TEllipse_p; -typedef TEllipse_t const* const_TEllipse_p; ---// Opaque type definition for TGaxis -typedef struct TGaxis_tag TGaxis_t; -typedef TGaxis_t * TGaxis_p; -typedef TGaxis_t const* const_TGaxis_p; ---// Opaque type definition for TGraphPolar -typedef struct TGraphPolar_tag TGraphPolar_t; -typedef TGraphPolar_t * TGraphPolar_p; -typedef TGraphPolar_t const* const_TGraphPolar_p; ---// Opaque type definition for TGraphQQ -typedef struct TGraphQQ_tag TGraphQQ_t; -typedef TGraphQQ_t * TGraphQQ_p; -typedef TGraphQQ_t const* const_TGraphQQ_p; ---// Opaque type definition for TLine -typedef struct TLine_tag TLine_t; -typedef TLine_t * TLine_p; -typedef TLine_t const* const_TLine_p; ---// Opaque type definition for TPad -typedef struct TPad_tag TPad_t; -typedef TPad_t * TPad_p; -typedef TPad_t const* const_TPad_p; ---// Opaque type definition for TPCON -typedef struct TPCON_tag TPCON_t; -typedef TPCON_t * TPCON_p; -typedef TPCON_t const* const_TPCON_p; ---// Opaque type definition for TShape -typedef struct TShape_tag TShape_t; -typedef TShape_t * TShape_p; -typedef TShape_t const* const_TShape_p; ---// Opaque type definition for TSPHE -typedef struct TSPHE_tag TSPHE_t; -typedef TSPHE_t * TSPHE_p; -typedef TSPHE_t const* const_TSPHE_p; ---// Opaque type definition for TTUBE -typedef struct TTUBE_tag TTUBE_t; -typedef TTUBE_t * TTUBE_p; -typedef TTUBE_t const* const_TTUBE_p; ---#endif // __HROOT_GRAF__+#pragma once +// Opaque type definition for $classname+typedef struct TArc_tag TArc_t;typedef TArc_t * TArc_p;typedef TArc_t const* const_TArc_p;+// Opaque type definition for $classname+typedef struct TArrow_tag TArrow_t;typedef TArrow_t * TArrow_p;typedef TArrow_t const* const_TArrow_p;+// Opaque type definition for $classname+typedef struct TAttImage_tag TAttImage_t;typedef TAttImage_t * TAttImage_p;typedef TAttImage_t const* const_TAttImage_p;+// Opaque type definition for $classname+typedef struct TBox_tag TBox_t;typedef TBox_t * TBox_p;typedef TBox_t const* const_TBox_p;+// Opaque type definition for $classname+typedef struct TBRIK_tag TBRIK_t;typedef TBRIK_t * TBRIK_p;typedef TBRIK_t const* const_TBRIK_p;+// Opaque type definition for $classname+typedef struct TCanvas_tag TCanvas_t;typedef TCanvas_t * TCanvas_p;typedef TCanvas_t const* const_TCanvas_p;+// Opaque type definition for $classname+typedef struct TCrown_tag TCrown_t;typedef TCrown_t * TCrown_p;typedef TCrown_t const* const_TCrown_p;+// Opaque type definition for $classname+typedef struct TCutG_tag TCutG_t;typedef TCutG_t * TCutG_p;typedef TCutG_t const* const_TCutG_p;+// Opaque type definition for $classname+typedef struct TEllipse_tag TEllipse_t;typedef TEllipse_t * TEllipse_p;typedef TEllipse_t const* const_TEllipse_p;+// Opaque type definition for $classname+typedef struct TGaxis_tag TGaxis_t;typedef TGaxis_t * TGaxis_p;typedef TGaxis_t const* const_TGaxis_p;+// Opaque type definition for $classname+typedef struct TGraphPolar_tag TGraphPolar_t;typedef TGraphPolar_t * TGraphPolar_p;typedef TGraphPolar_t const* const_TGraphPolar_p;+// Opaque type definition for $classname+typedef struct TGraphQQ_tag TGraphQQ_t;typedef TGraphQQ_t * TGraphQQ_p;typedef TGraphQQ_t const* const_TGraphQQ_p;+// Opaque type definition for $classname+typedef struct TLine_tag TLine_t;typedef TLine_t * TLine_p;typedef TLine_t const* const_TLine_p;+// Opaque type definition for $classname+typedef struct TMarker_tag TMarker_t;typedef TMarker_t * TMarker_p;typedef TMarker_t const* const_TMarker_p;+// Opaque type definition for $classname+typedef struct TPad_tag TPad_t;typedef TPad_t * TPad_p;typedef TPad_t const* const_TPad_p;+// Opaque type definition for $classname+typedef struct TPCON_tag TPCON_t;typedef TPCON_t * TPCON_p;typedef TPCON_t const* const_TPCON_p;+// Opaque type definition for $classname+typedef struct TShape_tag TShape_t;typedef TShape_t * TShape_p;typedef TShape_t const* const_TShape_p;+// Opaque type definition for $classname+typedef struct TSPHE_tag TSPHE_t;typedef TSPHE_t * TSPHE_p;typedef TSPHE_t const* const_TSPHE_p;+// Opaque type definition for $classname+typedef struct TTUBE_tag TTUBE_t;typedef TTUBE_t * TTUBE_p;typedef TTUBE_t const* const_TTUBE_p;+// Opaque type definition for $classname+typedef struct TView_tag TView_t;typedef TView_t * TView_p;typedef TView_t const* const_TView_p;+// Opaque type definition for $classname+typedef struct TView3D_tag TView3D_t;typedef TView3D_t * TView3D_p;typedef TView3D_t const* const_TView3D_p; #ifdef __cplusplus } #endif
csrc/HROOTGrafTArc.cpp view
@@ -1,25 +1,27 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"+ #include "HROOTGrafTEllipse.h"+ #include "TArc.h"-#include "HROOTGrafTArc.h" +#include "HROOTGrafTArc.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)  #define TYPECASTMETHOD(cname,mname,oname) \-  IIF( CHECKPROTECT(cname,mname) ) ( \-  (to_nonconst<oname,cname ## _t>), \-  (to_nonconst<cname,cname ## _t>) )-+  FXIIF( CHECKPROTECT(cname,mname) ) ( \+  (from_nonconst_to_nonconst<oname,cname ## _t>), \+  (from_nonconst_to_nonconst<cname,cname ## _t>) )  TELLIPSE_DEF_VIRT(TArc) TOBJECT_DEF_VIRT(TArc) TATTLINE_DEF_VIRT(TArc) TATTFILL_DEF_VIRT(TArc) DELETABLE_DEF_VIRT(TArc)- TARC_DEF_VIRT(TArc)- TARC_DEF_NONVIRT(TArc)+TARC_DEF_ACCESSOR(TArc) 
csrc/HROOTGrafTArc.h view
@@ -1,51 +1,58 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_GRAF__TArc__-#define __HROOT_GRAF__TArc__+#pragma once + #include "HROOT-grafType.h"+ #include "HROOTGrafTEllipse.h"+ #include "HROOTCoreTObject.h"+ #include "HROOTCoreTAttLine.h"+ #include "HROOTCoreTAttFill.h"-#include "HROOTCoreDeletable.h" -#undef TARC_DECL_VIRT +#include "STDDeletable.h"++ #define TARC_DECL_VIRT(Type) \  -#undef TARC_DECL_NONVIRT + #define TARC_DECL_NONVIRT(Type) \-Type ## _p Type ## _newTArc ( double x1, double y1, double radius, double phimin, double phimax )+Type##_p Type##_newTArc ( double x1, double y1, double radius, double phimin, double phimax ); -#undef TARC_DEF_VIRT-#define TARC_DEF_VIRT(Type)\ +#define TARC_DECL_ACCESSOR(Type) \ -#undef TARC_DEF_NONVIRT-#define TARC_DEF_NONVIRT(Type)\-Type ## _p Type ## _newTArc ( double x1, double y1, double radius, double phimin, double phimax )\-{\-Type * newp = new Type (x1, y1, radius, phimin, phimax); \-return to_nonconst<Type ## _t, Type >(newp);\-} -TELLIPSE_DECL_VIRT(TArc);-TOBJECT_DECL_VIRT(TArc);-TATTLINE_DECL_VIRT(TArc);-TATTFILL_DECL_VIRT(TArc);-DELETABLE_DECL_VIRT(TArc); +#define TARC_DEF_VIRT(Type) \ -TARC_DECL_VIRT(TArc);  -TARC_DECL_NONVIRT(TArc);+#define TARC_DEF_NONVIRT(Type) \+Type##_p Type##_newTArc ( double x1, double y1, double radius, double phimin, double phimax ) {\+Type* newp=new Type(x1, y1, radius, phimin, phimax);return from_nonconst_to_nonconst<Type##_t, Type>(newp);\+}  -#endif // __HROOT_GRAF__TArc__+#define TARC_DEF_ACCESSOR(Type) \++++TELLIPSE_DECL_VIRT(TArc)+TOBJECT_DECL_VIRT(TArc)+TATTLINE_DECL_VIRT(TArc)+TATTFILL_DECL_VIRT(TArc)+DELETABLE_DECL_VIRT(TArc)+TARC_DECL_VIRT(TArc)+TARC_DECL_NONVIRT(TArc)+TARC_DECL_ACCESSOR(TArc)  #ifdef __cplusplus }
csrc/HROOTGrafTArrow.cpp view
@@ -1,26 +1,29 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"+ #include "HROOTGrafTLine.h"+ #include "HROOTCoreTAttFill.h"+ #include "TArrow.h"-#include "HROOTGrafTArrow.h" +#include "HROOTGrafTArrow.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)  #define TYPECASTMETHOD(cname,mname,oname) \-  IIF( CHECKPROTECT(cname,mname) ) ( \-  (to_nonconst<oname,cname ## _t>), \-  (to_nonconst<cname,cname ## _t>) )-+  FXIIF( CHECKPROTECT(cname,mname) ) ( \+  (from_nonconst_to_nonconst<oname,cname ## _t>), \+  (from_nonconst_to_nonconst<cname,cname ## _t>) )  TLINE_DEF_VIRT(TArrow) TATTFILL_DEF_VIRT(TArrow) TOBJECT_DEF_VIRT(TArrow) TATTLINE_DEF_VIRT(TArrow) DELETABLE_DEF_VIRT(TArrow)- TARROW_DEF_VIRT(TArrow)- TARROW_DEF_NONVIRT(TArrow)+TARROW_DEF_ACCESSOR(TArrow) 
csrc/HROOTGrafTArrow.h view
@@ -1,52 +1,60 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_GRAF__TArrow__-#define __HROOT_GRAF__TArrow__+#pragma once + #include "HROOT-grafType.h"+ #include "HROOTGrafTLine.h"+ #include "HROOTCoreTAttFill.h"+ #include "HROOTCoreTObject.h"+ #include "HROOTCoreTAttLine.h"-#include "HROOTCoreDeletable.h"++#include "STDDeletable.h"+ #include "HROOT-coreType.h" -#undef TARROW_DECL_VIRT + #define TARROW_DECL_VIRT(Type) \  -#undef TARROW_DECL_NONVIRT + #define TARROW_DECL_NONVIRT(Type) \-Type ## _p Type ## _newTArrow ( double x1, double y1, double x2, double y2, double arrowsize, const char* option )+Type##_p Type##_newTArrow ( double x1, double y1, double x2, double y2, float arrowsize, const char* option ); -#undef TARROW_DEF_VIRT-#define TARROW_DEF_VIRT(Type)\ +#define TARROW_DECL_ACCESSOR(Type) \ -#undef TARROW_DEF_NONVIRT-#define TARROW_DEF_NONVIRT(Type)\-Type ## _p Type ## _newTArrow ( double x1, double y1, double x2, double y2, double arrowsize, const char* option )\-{\-Type * newp = new Type (x1, y1, x2, y2, arrowsize, option); \-return to_nonconst<Type ## _t, Type >(newp);\-} -TLINE_DECL_VIRT(TArrow);-TATTFILL_DECL_VIRT(TArrow);-TOBJECT_DECL_VIRT(TArrow);-TATTLINE_DECL_VIRT(TArrow);-DELETABLE_DECL_VIRT(TArrow); +#define TARROW_DEF_VIRT(Type) \ -TARROW_DECL_VIRT(TArrow);  -TARROW_DECL_NONVIRT(TArrow);+#define TARROW_DEF_NONVIRT(Type) \+Type##_p Type##_newTArrow ( double x1, double y1, double x2, double y2, float arrowsize, const char* option ) {\+Type* newp=new Type(x1, y1, x2, y2, arrowsize, option);return from_nonconst_to_nonconst<Type##_t, Type>(newp);\+}  -#endif // __HROOT_GRAF__TArrow__+#define TARROW_DEF_ACCESSOR(Type) \++++TLINE_DECL_VIRT(TArrow)+TATTFILL_DECL_VIRT(TArrow)+TOBJECT_DECL_VIRT(TArrow)+TATTLINE_DECL_VIRT(TArrow)+DELETABLE_DECL_VIRT(TArrow)+TARROW_DECL_VIRT(TArrow)+TARROW_DECL_NONVIRT(TArrow)+TARROW_DECL_ACCESSOR(TArrow)  #ifdef __cplusplus }
csrc/HROOTGrafTAttImage.cpp view
@@ -1,21 +1,23 @@-#include <MacroPatternMatch.h>-#include "HROOTCoreDeletable.h"++#include "MacroPatternMatch.h"++#include "STDDeletable.h"+ #include "TAttImage.h"-#include "HROOTGrafTAttImage.h" +#include "HROOTGrafTAttImage.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)  #define TYPECASTMETHOD(cname,mname,oname) \-  IIF( CHECKPROTECT(cname,mname) ) ( \-  (to_nonconst<oname,cname ## _t>), \-  (to_nonconst<cname,cname ## _t>) )-+  FXIIF( CHECKPROTECT(cname,mname) ) ( \+  (from_nonconst_to_nonconst<oname,cname ## _t>), \+  (from_nonconst_to_nonconst<cname,cname ## _t>) )  DELETABLE_DEF_VIRT(TAttImage)- TATTIMAGE_DEF_VIRT(TAttImage)- TATTIMAGE_DEF_NONVIRT(TAttImage)+TATTIMAGE_DEF_ACCESSOR(TAttImage) 
csrc/HROOTGrafTAttImage.h view
@@ -1,40 +1,46 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_GRAF__TAttImage__-#define __HROOT_GRAF__TAttImage__+#pragma once + #include "HROOT-grafType.h"-#include "HROOTCoreDeletable.h"-#include "HROOT-coreType.h" -#undef TATTIMAGE_DECL_VIRT +#include "STDDeletable.h"++#include "stdcxxType.h"++ #define TATTIMAGE_DECL_VIRT(Type) \  -#undef TATTIMAGE_DECL_NONVIRT + #define TATTIMAGE_DECL_NONVIRT(Type) \  -#undef TATTIMAGE_DEF_VIRT-#define TATTIMAGE_DEF_VIRT(Type)\ +#define TATTIMAGE_DECL_ACCESSOR(Type) \ -#undef TATTIMAGE_DEF_NONVIRT-#define TATTIMAGE_DEF_NONVIRT(Type)\  -DELETABLE_DECL_VIRT(TAttImage);+#define TATTIMAGE_DEF_VIRT(Type) \  -TATTIMAGE_DECL_VIRT(TAttImage); +#define TATTIMAGE_DEF_NONVIRT(Type) \ -TATTIMAGE_DECL_NONVIRT(TAttImage);  -#endif // __HROOT_GRAF__TAttImage__+#define TATTIMAGE_DEF_ACCESSOR(Type) \++++DELETABLE_DECL_VIRT(TAttImage)+TATTIMAGE_DECL_VIRT(TAttImage)+TATTIMAGE_DECL_NONVIRT(TAttImage)+TATTIMAGE_DECL_ACCESSOR(TAttImage)  #ifdef __cplusplus }
csrc/HROOTGrafTBRIK.cpp view
@@ -1,17 +1,20 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"+ #include "HROOTGrafTShape.h"+ #include "TBRIK.h"-#include "HROOTGrafTBRIK.h" +#include "HROOTGrafTBRIK.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)  #define TYPECASTMETHOD(cname,mname,oname) \-  IIF( CHECKPROTECT(cname,mname) ) ( \-  (to_nonconst<oname,cname ## _t>), \-  (to_nonconst<cname,cname ## _t>) )-+  FXIIF( CHECKPROTECT(cname,mname) ) ( \+  (from_nonconst_to_nonconst<oname,cname ## _t>), \+  (from_nonconst_to_nonconst<cname,cname ## _t>) )  TSHAPE_DEF_VIRT(TBRIK) TNAMED_DEF_VIRT(TBRIK)@@ -20,8 +23,7 @@ TATT3D_DEF_VIRT(TBRIK) TOBJECT_DEF_VIRT(TBRIK) DELETABLE_DEF_VIRT(TBRIK)- TBRIK_DEF_VIRT(TBRIK)- TBRIK_DEF_NONVIRT(TBRIK)+TBRIK_DEF_ACCESSOR(TBRIK) 
csrc/HROOTGrafTBRIK.h view
@@ -1,55 +1,64 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_GRAF__TBRIK__-#define __HROOT_GRAF__TBRIK__+#pragma once + #include "HROOT-grafType.h"+ #include "HROOTGrafTShape.h"+ #include "HROOTCoreTNamed.h"+ #include "HROOTCoreTAttLine.h"+ #include "HROOTCoreTAttFill.h"+ #include "HROOTCoreTAtt3D.h"+ #include "HROOTCoreTObject.h"-#include "HROOTCoreDeletable.h" -#undef TBRIK_DECL_VIRT +#include "STDDeletable.h"++ #define TBRIK_DECL_VIRT(Type) \  -#undef TBRIK_DECL_NONVIRT + #define TBRIK_DECL_NONVIRT(Type) \-Type ## _p Type ## _newTBRIK ( const char* name, const char* title, const char* material, double dx, double dy, double dz )+Type##_p Type##_newTBRIK ( const char* name, const char* title, const char* material, float dx, float dy, float dz ); -#undef TBRIK_DEF_VIRT-#define TBRIK_DEF_VIRT(Type)\ +#define TBRIK_DECL_ACCESSOR(Type) \ -#undef TBRIK_DEF_NONVIRT-#define TBRIK_DEF_NONVIRT(Type)\-Type ## _p Type ## _newTBRIK ( const char* name, const char* title, const char* material, double dx, double dy, double dz )\-{\-Type * newp = new Type (name, title, material, dx, dy, dz); \-return to_nonconst<Type ## _t, Type >(newp);\-} -TSHAPE_DECL_VIRT(TBRIK);-TNAMED_DECL_VIRT(TBRIK);-TATTLINE_DECL_VIRT(TBRIK);-TATTFILL_DECL_VIRT(TBRIK);-TATT3D_DECL_VIRT(TBRIK);-TOBJECT_DECL_VIRT(TBRIK);-DELETABLE_DECL_VIRT(TBRIK); +#define TBRIK_DEF_VIRT(Type) \ -TBRIK_DECL_VIRT(TBRIK);  -TBRIK_DECL_NONVIRT(TBRIK);+#define TBRIK_DEF_NONVIRT(Type) \+Type##_p Type##_newTBRIK ( const char* name, const char* title, const char* material, float dx, float dy, float dz ) {\+Type* newp=new Type(name, title, material, dx, dy, dz);return from_nonconst_to_nonconst<Type##_t, Type>(newp);\+}  -#endif // __HROOT_GRAF__TBRIK__+#define TBRIK_DEF_ACCESSOR(Type) \++++TSHAPE_DECL_VIRT(TBRIK)+TNAMED_DECL_VIRT(TBRIK)+TATTLINE_DECL_VIRT(TBRIK)+TATTFILL_DECL_VIRT(TBRIK)+TATT3D_DECL_VIRT(TBRIK)+TOBJECT_DECL_VIRT(TBRIK)+DELETABLE_DECL_VIRT(TBRIK)+TBRIK_DECL_VIRT(TBRIK)+TBRIK_DECL_NONVIRT(TBRIK)+TBRIK_DECL_ACCESSOR(TBRIK)  #ifdef __cplusplus }
+ csrc/HROOTGrafTBox.cpp view
@@ -0,0 +1,30 @@++#include "MacroPatternMatch.h"++#include "HROOTCoreTObject.h"++#include "HROOTCoreTAttLine.h"++#include "HROOTCoreTAttFill.h"++#include "TBox.h"++#include "HROOTGrafTBox.h"++using namespace ROOT;++#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)++#define TYPECASTMETHOD(cname,mname,oname) \+  FXIIF( CHECKPROTECT(cname,mname) ) ( \+  (from_nonconst_to_nonconst<oname,cname ## _t>), \+  (from_nonconst_to_nonconst<cname,cname ## _t>) )++TOBJECT_DEF_VIRT(TBox)+TATTLINE_DEF_VIRT(TBox)+TATTFILL_DEF_VIRT(TBox)+DELETABLE_DEF_VIRT(TBox)+TBOX_DEF_VIRT(TBox)+TBOX_DEF_NONVIRT(TBox)+TBOX_DEF_ACCESSOR(TBox)+
+ csrc/HROOTGrafTBox.h view
@@ -0,0 +1,59 @@++#ifdef __cplusplus+extern "C" {+#endif++#pragma once+++#include "HROOT-grafType.h"++#include "HROOTCoreTObject.h"++#include "HROOTCoreTAttLine.h"++#include "HROOTCoreTAttFill.h"++#include "STDDeletable.h"++#include "HROOT-coreType.h"+++#define TBOX_DECL_VIRT(Type) \++++#define TBOX_DECL_NONVIRT(Type) \+Type##_p Type##_newTBox ( double x1, double y1, double x2, double y2 );+++#define TBOX_DECL_ACCESSOR(Type) \++++#define TBOX_DEF_VIRT(Type) \++++#define TBOX_DEF_NONVIRT(Type) \+Type##_p Type##_newTBox ( double x1, double y1, double x2, double y2 ) {\+Type* newp=new Type(x1, y1, x2, y2);return from_nonconst_to_nonconst<Type##_t, Type>(newp);\+}+++#define TBOX_DEF_ACCESSOR(Type) \++++TOBJECT_DECL_VIRT(TBox)+TATTLINE_DECL_VIRT(TBox)+TATTFILL_DECL_VIRT(TBox)+DELETABLE_DECL_VIRT(TBox)+TBOX_DECL_VIRT(TBox)+TBOX_DECL_NONVIRT(TBox)+TBOX_DECL_ACCESSOR(TBox)++#ifdef __cplusplus+}+#endif+
csrc/HROOTGrafTCanvas.cpp view
@@ -1,24 +1,30 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"+ #include "HROOTGrafTPad.h"+ #include "TCanvas.h"-#include "HROOTGrafTCanvas.h" +#include "HROOTGrafTCanvas.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)  #define TYPECASTMETHOD(cname,mname,oname) \-  IIF( CHECKPROTECT(cname,mname) ) ( \-  (to_nonconst<oname,cname ## _t>), \-  (to_nonconst<cname,cname ## _t>) )-+  FXIIF( CHECKPROTECT(cname,mname) ) ( \+  (from_nonconst_to_nonconst<oname,cname ## _t>), \+  (from_nonconst_to_nonconst<cname,cname ## _t>) )  TPAD_DEF_VIRT(TCanvas) TVIRTUALPAD_DEF_VIRT(TCanvas) TOBJECT_DEF_VIRT(TCanvas)+TATTLINE_DEF_VIRT(TCanvas)+TATTFILL_DEF_VIRT(TCanvas)+TATTPAD_DEF_VIRT(TCanvas)+TQOBJECT_DEF_VIRT(TCanvas) DELETABLE_DEF_VIRT(TCanvas)- TCANVAS_DEF_VIRT(TCanvas)- TCANVAS_DEF_NONVIRT(TCanvas)+TCANVAS_DEF_ACCESSOR(TCanvas) 
csrc/HROOTGrafTCanvas.h view
@@ -1,49 +1,84 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_GRAF__TCanvas__-#define __HROOT_GRAF__TCanvas__+#pragma once + #include "HROOT-grafType.h"+ #include "HROOTGrafTPad.h"+ #include "HROOTCoreTVirtualPad.h"+ #include "HROOTCoreTObject.h"-#include "HROOTCoreDeletable.h" -#undef TCANVAS_DECL_VIRT +#include "HROOTCoreTAttLine.h"++#include "HROOTCoreTAttFill.h"++#include "HROOTCoreTAttPad.h"++#include "HROOTCoreTQObject.h"++#include "STDDeletable.h"++ #define TCANVAS_DECL_VIRT(Type) \+void Type##_ToggleEditor ( Type##_p p );\+void Type##_ToggleEventStatus ( Type##_p p );\+void Type##_ToggleToolBar ( Type##_p p );\+void Type##_ToggleToolTips ( Type##_p p );  -#undef TCANVAS_DECL_NONVIRT  #define TCANVAS_DECL_NONVIRT(Type) \-Type ## _p Type ## _newTCanvas ( const char* name, const char* title, int ww, int wh )+Type##_p Type##_newTCanvas ( const char* name, const char* title, int ww, int wh ); -#undef TCANVAS_DEF_VIRT-#define TCANVAS_DEF_VIRT(Type)\ +#define TCANVAS_DECL_ACCESSOR(Type) \ -#undef TCANVAS_DEF_NONVIRT-#define TCANVAS_DEF_NONVIRT(Type)\-Type ## _p Type ## _newTCanvas ( const char* name, const char* title, int ww, int wh )\-{\-Type * newp = new Type (name, title, ww, wh); \-return to_nonconst<Type ## _t, Type >(newp);\+++#define TCANVAS_DEF_VIRT(Type) \+void Type##_ToggleEditor ( Type##_p p ) {\+((TYPECASTMETHOD(Type, ToggleEditor, TCanvas))(p))->ToggleEditor();\+}\+\+void Type##_ToggleEventStatus ( Type##_p p ) {\+((TYPECASTMETHOD(Type, ToggleEventStatus, TCanvas))(p))->ToggleEventStatus();\+}\+\+void Type##_ToggleToolBar ( Type##_p p ) {\+((TYPECASTMETHOD(Type, ToggleToolBar, TCanvas))(p))->ToggleToolBar();\+}\+\+void Type##_ToggleToolTips ( Type##_p p ) {\+((TYPECASTMETHOD(Type, ToggleToolTips, TCanvas))(p))->ToggleToolTips();\ } -TPAD_DECL_VIRT(TCanvas);-TVIRTUALPAD_DECL_VIRT(TCanvas);-TOBJECT_DECL_VIRT(TCanvas);-DELETABLE_DECL_VIRT(TCanvas); +#define TCANVAS_DEF_NONVIRT(Type) \+Type##_p Type##_newTCanvas ( const char* name, const char* title, int ww, int wh ) {\+Type* newp=new Type(name, title, ww, wh);return from_nonconst_to_nonconst<Type##_t, Type>(newp);\+} -TCANVAS_DECL_VIRT(TCanvas); +#define TCANVAS_DEF_ACCESSOR(Type) \ -TCANVAS_DECL_NONVIRT(TCanvas);  -#endif // __HROOT_GRAF__TCanvas__+TPAD_DECL_VIRT(TCanvas)+TVIRTUALPAD_DECL_VIRT(TCanvas)+TOBJECT_DECL_VIRT(TCanvas)+TATTLINE_DECL_VIRT(TCanvas)+TATTFILL_DECL_VIRT(TCanvas)+TATTPAD_DECL_VIRT(TCanvas)+TQOBJECT_DECL_VIRT(TCanvas)+DELETABLE_DECL_VIRT(TCanvas)+TCANVAS_DECL_VIRT(TCanvas)+TCANVAS_DECL_NONVIRT(TCanvas)+TCANVAS_DECL_ACCESSOR(TCanvas)  #ifdef __cplusplus }
csrc/HROOTGrafTCrown.cpp view
@@ -1,25 +1,27 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"+ #include "HROOTGrafTEllipse.h"+ #include "TCrown.h"-#include "HROOTGrafTCrown.h" +#include "HROOTGrafTCrown.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)  #define TYPECASTMETHOD(cname,mname,oname) \-  IIF( CHECKPROTECT(cname,mname) ) ( \-  (to_nonconst<oname,cname ## _t>), \-  (to_nonconst<cname,cname ## _t>) )-+  FXIIF( CHECKPROTECT(cname,mname) ) ( \+  (from_nonconst_to_nonconst<oname,cname ## _t>), \+  (from_nonconst_to_nonconst<cname,cname ## _t>) )  TELLIPSE_DEF_VIRT(TCrown) TOBJECT_DEF_VIRT(TCrown) TATTLINE_DEF_VIRT(TCrown) TATTFILL_DEF_VIRT(TCrown) DELETABLE_DEF_VIRT(TCrown)- TCROWN_DEF_VIRT(TCrown)- TCROWN_DEF_NONVIRT(TCrown)+TCROWN_DEF_ACCESSOR(TCrown) 
csrc/HROOTGrafTCrown.h view
@@ -1,51 +1,58 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_GRAF__TCrown__-#define __HROOT_GRAF__TCrown__+#pragma once + #include "HROOT-grafType.h"+ #include "HROOTGrafTEllipse.h"+ #include "HROOTCoreTObject.h"+ #include "HROOTCoreTAttLine.h"+ #include "HROOTCoreTAttFill.h"-#include "HROOTCoreDeletable.h" -#undef TCROWN_DECL_VIRT +#include "STDDeletable.h"++ #define TCROWN_DECL_VIRT(Type) \  -#undef TCROWN_DECL_NONVIRT + #define TCROWN_DECL_NONVIRT(Type) \-Type ## _p Type ## _newTCrown ( double x1, double y1, double radin, double radout, double phimin, double phimax )+Type##_p Type##_newTCrown ( double x1, double y1, double radin, double radout, double phimin, double phimax ); -#undef TCROWN_DEF_VIRT-#define TCROWN_DEF_VIRT(Type)\ +#define TCROWN_DECL_ACCESSOR(Type) \ -#undef TCROWN_DEF_NONVIRT-#define TCROWN_DEF_NONVIRT(Type)\-Type ## _p Type ## _newTCrown ( double x1, double y1, double radin, double radout, double phimin, double phimax )\-{\-Type * newp = new Type (x1, y1, radin, radout, phimin, phimax); \-return to_nonconst<Type ## _t, Type >(newp);\-} -TELLIPSE_DECL_VIRT(TCrown);-TOBJECT_DECL_VIRT(TCrown);-TATTLINE_DECL_VIRT(TCrown);-TATTFILL_DECL_VIRT(TCrown);-DELETABLE_DECL_VIRT(TCrown); +#define TCROWN_DEF_VIRT(Type) \ -TCROWN_DECL_VIRT(TCrown);  -TCROWN_DECL_NONVIRT(TCrown);+#define TCROWN_DEF_NONVIRT(Type) \+Type##_p Type##_newTCrown ( double x1, double y1, double radin, double radout, double phimin, double phimax ) {\+Type* newp=new Type(x1, y1, radin, radout, phimin, phimax);return from_nonconst_to_nonconst<Type##_t, Type>(newp);\+}  -#endif // __HROOT_GRAF__TCrown__+#define TCROWN_DEF_ACCESSOR(Type) \++++TELLIPSE_DECL_VIRT(TCrown)+TOBJECT_DECL_VIRT(TCrown)+TATTLINE_DECL_VIRT(TCrown)+TATTFILL_DECL_VIRT(TCrown)+DELETABLE_DECL_VIRT(TCrown)+TCROWN_DECL_VIRT(TCrown)+TCROWN_DECL_NONVIRT(TCrown)+TCROWN_DECL_ACCESSOR(TCrown)  #ifdef __cplusplus }
csrc/HROOTGrafTCutG.cpp view
@@ -1,17 +1,20 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"+ #include "HROOTHistTGraph.h"+ #include "TCutG.h"-#include "HROOTGrafTCutG.h" +#include "HROOTGrafTCutG.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)  #define TYPECASTMETHOD(cname,mname,oname) \-  IIF( CHECKPROTECT(cname,mname) ) ( \-  (to_nonconst<oname,cname ## _t>), \-  (to_nonconst<cname,cname ## _t>) )-+  FXIIF( CHECKPROTECT(cname,mname) ) ( \+  (from_nonconst_to_nonconst<oname,cname ## _t>), \+  (from_nonconst_to_nonconst<cname,cname ## _t>) )  TGRAPH_DEF_VIRT(TCutG) TNAMED_DEF_VIRT(TCutG)@@ -20,8 +23,7 @@ TATTMARKER_DEF_VIRT(TCutG) TOBJECT_DEF_VIRT(TCutG) DELETABLE_DEF_VIRT(TCutG)- TCUTG_DEF_VIRT(TCutG)- TCUTG_DEF_NONVIRT(TCutG)+TCUTG_DEF_ACCESSOR(TCutG) 
csrc/HROOTGrafTCutG.h view
@@ -1,56 +1,66 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_GRAF__TCutG__-#define __HROOT_GRAF__TCutG__+#pragma once + #include "HROOT-grafType.h"+ #include "HROOTHistTGraph.h"+ #include "HROOTCoreTNamed.h"+ #include "HROOTCoreTAttLine.h"+ #include "HROOTCoreTAttFill.h"+ #include "HROOTCoreTAttMarker.h"+ #include "HROOTCoreTObject.h"-#include "HROOTCoreDeletable.h"++#include "STDDeletable.h"+ #include "HROOT-histType.h" -#undef TCUTG_DECL_VIRT + #define TCUTG_DECL_VIRT(Type) \  -#undef TCUTG_DECL_NONVIRT + #define TCUTG_DECL_NONVIRT(Type) \-Type ## _p Type ## _newTCutG ( const char* name, int n, double * x, double * y )+Type##_p Type##_newTCutG ( const char* name, int n, double* x, double* y ); -#undef TCUTG_DEF_VIRT-#define TCUTG_DEF_VIRT(Type)\ +#define TCUTG_DECL_ACCESSOR(Type) \ -#undef TCUTG_DEF_NONVIRT-#define TCUTG_DEF_NONVIRT(Type)\-Type ## _p Type ## _newTCutG ( const char* name, int n, double * x, double * y )\-{\-Type * newp = new Type (name, n, x, y); \-return to_nonconst<Type ## _t, Type >(newp);\-} -TGRAPH_DECL_VIRT(TCutG);-TNAMED_DECL_VIRT(TCutG);-TATTLINE_DECL_VIRT(TCutG);-TATTFILL_DECL_VIRT(TCutG);-TATTMARKER_DECL_VIRT(TCutG);-TOBJECT_DECL_VIRT(TCutG);-DELETABLE_DECL_VIRT(TCutG); +#define TCUTG_DEF_VIRT(Type) \ -TCUTG_DECL_VIRT(TCutG);  -TCUTG_DECL_NONVIRT(TCutG);+#define TCUTG_DEF_NONVIRT(Type) \+Type##_p Type##_newTCutG ( const char* name, int n, double* x, double* y ) {\+Type* newp=new Type(name, n, x, y);return from_nonconst_to_nonconst<Type##_t, Type>(newp);\+}  -#endif // __HROOT_GRAF__TCutG__+#define TCUTG_DEF_ACCESSOR(Type) \++++TGRAPH_DECL_VIRT(TCutG)+TNAMED_DECL_VIRT(TCutG)+TATTLINE_DECL_VIRT(TCutG)+TATTFILL_DECL_VIRT(TCutG)+TATTMARKER_DECL_VIRT(TCutG)+TOBJECT_DECL_VIRT(TCutG)+DELETABLE_DECL_VIRT(TCutG)+TCUTG_DECL_VIRT(TCutG)+TCUTG_DECL_NONVIRT(TCutG)+TCUTG_DECL_ACCESSOR(TCutG)  #ifdef __cplusplus }
csrc/HROOTGrafTEllipse.cpp view
@@ -1,26 +1,30 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"+ #include "HROOTCoreTObject.h"+ #include "HROOTCoreTAttLine.h"+ #include "HROOTCoreTAttFill.h"+ #include "TEllipse.h"-#include "HROOTGrafTEllipse.h" +#include "HROOTGrafTEllipse.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)  #define TYPECASTMETHOD(cname,mname,oname) \-  IIF( CHECKPROTECT(cname,mname) ) ( \-  (to_nonconst<oname,cname ## _t>), \-  (to_nonconst<cname,cname ## _t>) )-+  FXIIF( CHECKPROTECT(cname,mname) ) ( \+  (from_nonconst_to_nonconst<oname,cname ## _t>), \+  (from_nonconst_to_nonconst<cname,cname ## _t>) )  TOBJECT_DEF_VIRT(TEllipse) TATTLINE_DEF_VIRT(TEllipse) TATTFILL_DEF_VIRT(TEllipse) DELETABLE_DEF_VIRT(TEllipse)- TELLIPSE_DEF_VIRT(TEllipse)- TELLIPSE_DEF_NONVIRT(TEllipse)+TELLIPSE_DEF_ACCESSOR(TEllipse) 
csrc/HROOTGrafTEllipse.h view
@@ -1,50 +1,57 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_GRAF__TEllipse__-#define __HROOT_GRAF__TEllipse__+#pragma once + #include "HROOT-grafType.h"+ #include "HROOTCoreTObject.h"+ #include "HROOTCoreTAttLine.h"+ #include "HROOTCoreTAttFill.h"-#include "HROOTCoreDeletable.h"++#include "STDDeletable.h"+ #include "HROOT-coreType.h" -#undef TELLIPSE_DECL_VIRT + #define TELLIPSE_DECL_VIRT(Type) \  -#undef TELLIPSE_DECL_NONVIRT + #define TELLIPSE_DECL_NONVIRT(Type) \-Type ## _p Type ## _newTEllipse ( double x1, double y1, double r1, double r2, double phimin, double phimax, double theta )+Type##_p Type##_newTEllipse ( double x1, double y1, double r1, double r2, double phimin, double phimax, double theta ); -#undef TELLIPSE_DEF_VIRT-#define TELLIPSE_DEF_VIRT(Type)\ +#define TELLIPSE_DECL_ACCESSOR(Type) \ -#undef TELLIPSE_DEF_NONVIRT-#define TELLIPSE_DEF_NONVIRT(Type)\-Type ## _p Type ## _newTEllipse ( double x1, double y1, double r1, double r2, double phimin, double phimax, double theta )\-{\-Type * newp = new Type (x1, y1, r1, r2, phimin, phimax, theta); \-return to_nonconst<Type ## _t, Type >(newp);\-} -TOBJECT_DECL_VIRT(TEllipse);-TATTLINE_DECL_VIRT(TEllipse);-TATTFILL_DECL_VIRT(TEllipse);-DELETABLE_DECL_VIRT(TEllipse); +#define TELLIPSE_DEF_VIRT(Type) \ -TELLIPSE_DECL_VIRT(TEllipse);  -TELLIPSE_DECL_NONVIRT(TEllipse);+#define TELLIPSE_DEF_NONVIRT(Type) \+Type##_p Type##_newTEllipse ( double x1, double y1, double r1, double r2, double phimin, double phimax, double theta ) {\+Type* newp=new Type(x1, y1, r1, r2, phimin, phimax, theta);return from_nonconst_to_nonconst<Type##_t, Type>(newp);\+}  -#endif // __HROOT_GRAF__TEllipse__+#define TELLIPSE_DEF_ACCESSOR(Type) \++++TOBJECT_DECL_VIRT(TEllipse)+TATTLINE_DECL_VIRT(TEllipse)+TATTFILL_DECL_VIRT(TEllipse)+DELETABLE_DECL_VIRT(TEllipse)+TELLIPSE_DECL_VIRT(TEllipse)+TELLIPSE_DECL_NONVIRT(TEllipse)+TELLIPSE_DECL_ACCESSOR(TEllipse)  #ifdef __cplusplus }
csrc/HROOTGrafTGaxis.cpp view
@@ -1,26 +1,29 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"+ #include "HROOTGrafTLine.h"+ #include "HROOTCoreTAttText.h"+ #include "TGaxis.h"-#include "HROOTGrafTGaxis.h" +#include "HROOTGrafTGaxis.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)  #define TYPECASTMETHOD(cname,mname,oname) \-  IIF( CHECKPROTECT(cname,mname) ) ( \-  (to_nonconst<oname,cname ## _t>), \-  (to_nonconst<cname,cname ## _t>) )-+  FXIIF( CHECKPROTECT(cname,mname) ) ( \+  (from_nonconst_to_nonconst<oname,cname ## _t>), \+  (from_nonconst_to_nonconst<cname,cname ## _t>) )  TLINE_DEF_VIRT(TGaxis) TATTTEXT_DEF_VIRT(TGaxis) TOBJECT_DEF_VIRT(TGaxis) TATTLINE_DEF_VIRT(TGaxis) DELETABLE_DEF_VIRT(TGaxis)- TGAXIS_DEF_VIRT(TGaxis)- TGAXIS_DEF_NONVIRT(TGaxis)+TGAXIS_DEF_ACCESSOR(TGaxis) 
csrc/HROOTGrafTGaxis.h view
@@ -1,52 +1,60 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_GRAF__TGaxis__-#define __HROOT_GRAF__TGaxis__+#pragma once + #include "HROOT-grafType.h"+ #include "HROOTGrafTLine.h"+ #include "HROOTCoreTAttText.h"+ #include "HROOTCoreTObject.h"+ #include "HROOTCoreTAttLine.h"-#include "HROOTCoreDeletable.h"++#include "STDDeletable.h"+ #include "HROOT-coreType.h" -#undef TGAXIS_DECL_VIRT + #define TGAXIS_DECL_VIRT(Type) \  -#undef TGAXIS_DECL_NONVIRT + #define TGAXIS_DECL_NONVIRT(Type) \-Type ## _p Type ## _newTGaxis ( double xmin, double ymin, double xmax, double ymax, double wmin, double wmax, int ndiv, const char* chopt, double gridlength )+Type##_p Type##_newTGaxis ( double xmin, double ymin, double xmax, double ymax, double wmin, double wmax, int ndiv, const char* chopt, double gridlength ); -#undef TGAXIS_DEF_VIRT-#define TGAXIS_DEF_VIRT(Type)\ +#define TGAXIS_DECL_ACCESSOR(Type) \ -#undef TGAXIS_DEF_NONVIRT-#define TGAXIS_DEF_NONVIRT(Type)\-Type ## _p Type ## _newTGaxis ( double xmin, double ymin, double xmax, double ymax, double wmin, double wmax, int ndiv, const char* chopt, double gridlength )\-{\-Type * newp = new Type (xmin, ymin, xmax, ymax, wmin, wmax, ndiv, chopt, gridlength); \-return to_nonconst<Type ## _t, Type >(newp);\-} -TLINE_DECL_VIRT(TGaxis);-TATTTEXT_DECL_VIRT(TGaxis);-TOBJECT_DECL_VIRT(TGaxis);-TATTLINE_DECL_VIRT(TGaxis);-DELETABLE_DECL_VIRT(TGaxis); +#define TGAXIS_DEF_VIRT(Type) \ -TGAXIS_DECL_VIRT(TGaxis);  -TGAXIS_DECL_NONVIRT(TGaxis);+#define TGAXIS_DEF_NONVIRT(Type) \+Type##_p Type##_newTGaxis ( double xmin, double ymin, double xmax, double ymax, double wmin, double wmax, int ndiv, const char* chopt, double gridlength ) {\+Type* newp=new Type(xmin, ymin, xmax, ymax, wmin, wmax, ndiv, chopt, gridlength);return from_nonconst_to_nonconst<Type##_t, Type>(newp);\+}  -#endif // __HROOT_GRAF__TGaxis__+#define TGAXIS_DEF_ACCESSOR(Type) \++++TLINE_DECL_VIRT(TGaxis)+TATTTEXT_DECL_VIRT(TGaxis)+TOBJECT_DECL_VIRT(TGaxis)+TATTLINE_DECL_VIRT(TGaxis)+DELETABLE_DECL_VIRT(TGaxis)+TGAXIS_DECL_VIRT(TGaxis)+TGAXIS_DECL_NONVIRT(TGaxis)+TGAXIS_DECL_ACCESSOR(TGaxis)  #ifdef __cplusplus }
csrc/HROOTGrafTGraphPolar.cpp view
@@ -1,17 +1,20 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"+ #include "HROOTHistTGraphErrors.h"+ #include "TGraphPolar.h"-#include "HROOTGrafTGraphPolar.h" +#include "HROOTGrafTGraphPolar.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)  #define TYPECASTMETHOD(cname,mname,oname) \-  IIF( CHECKPROTECT(cname,mname) ) ( \-  (to_nonconst<oname,cname ## _t>), \-  (to_nonconst<cname,cname ## _t>) )-+  FXIIF( CHECKPROTECT(cname,mname) ) ( \+  (from_nonconst_to_nonconst<oname,cname ## _t>), \+  (from_nonconst_to_nonconst<cname,cname ## _t>) )  TGRAPHERRORS_DEF_VIRT(TGraphPolar) TGRAPH_DEF_VIRT(TGraphPolar)@@ -21,8 +24,7 @@ TATTMARKER_DEF_VIRT(TGraphPolar) TOBJECT_DEF_VIRT(TGraphPolar) DELETABLE_DEF_VIRT(TGraphPolar)- TGRAPHPOLAR_DEF_VIRT(TGraphPolar)- TGRAPHPOLAR_DEF_NONVIRT(TGraphPolar)+TGRAPHPOLAR_DEF_ACCESSOR(TGraphPolar) 
csrc/HROOTGrafTGraphPolar.h view
@@ -1,58 +1,69 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_GRAF__TGraphPolar__-#define __HROOT_GRAF__TGraphPolar__+#pragma once + #include "HROOT-grafType.h"+ #include "HROOTHistTGraphErrors.h"+ #include "HROOTHistTGraph.h"+ #include "HROOTCoreTNamed.h"+ #include "HROOTCoreTAttLine.h"+ #include "HROOTCoreTAttFill.h"+ #include "HROOTCoreTAttMarker.h"+ #include "HROOTCoreTObject.h"-#include "HROOTCoreDeletable.h"++#include "STDDeletable.h"+ #include "HROOT-histType.h" -#undef TGRAPHPOLAR_DECL_VIRT + #define TGRAPHPOLAR_DECL_VIRT(Type) \  -#undef TGRAPHPOLAR_DECL_NONVIRT + #define TGRAPHPOLAR_DECL_NONVIRT(Type) \-Type ## _p Type ## _newTGraphPolar ( int n, double * x, double * y, double * ex, double * ey )+Type##_p Type##_newTGraphPolar ( int n, double* x, double* y, double* ex, double* ey ); -#undef TGRAPHPOLAR_DEF_VIRT-#define TGRAPHPOLAR_DEF_VIRT(Type)\ +#define TGRAPHPOLAR_DECL_ACCESSOR(Type) \ -#undef TGRAPHPOLAR_DEF_NONVIRT-#define TGRAPHPOLAR_DEF_NONVIRT(Type)\-Type ## _p Type ## _newTGraphPolar ( int n, double * x, double * y, double * ex, double * ey )\-{\-Type * newp = new Type (n, x, y, ex, ey); \-return to_nonconst<Type ## _t, Type >(newp);\-} -TGRAPHERRORS_DECL_VIRT(TGraphPolar);-TGRAPH_DECL_VIRT(TGraphPolar);-TNAMED_DECL_VIRT(TGraphPolar);-TATTLINE_DECL_VIRT(TGraphPolar);-TATTFILL_DECL_VIRT(TGraphPolar);-TATTMARKER_DECL_VIRT(TGraphPolar);-TOBJECT_DECL_VIRT(TGraphPolar);-DELETABLE_DECL_VIRT(TGraphPolar); +#define TGRAPHPOLAR_DEF_VIRT(Type) \ -TGRAPHPOLAR_DECL_VIRT(TGraphPolar);  -TGRAPHPOLAR_DECL_NONVIRT(TGraphPolar);+#define TGRAPHPOLAR_DEF_NONVIRT(Type) \+Type##_p Type##_newTGraphPolar ( int n, double* x, double* y, double* ex, double* ey ) {\+Type* newp=new Type(n, x, y, ex, ey);return from_nonconst_to_nonconst<Type##_t, Type>(newp);\+}  -#endif // __HROOT_GRAF__TGraphPolar__+#define TGRAPHPOLAR_DEF_ACCESSOR(Type) \++++TGRAPHERRORS_DECL_VIRT(TGraphPolar)+TGRAPH_DECL_VIRT(TGraphPolar)+TNAMED_DECL_VIRT(TGraphPolar)+TATTLINE_DECL_VIRT(TGraphPolar)+TATTFILL_DECL_VIRT(TGraphPolar)+TATTMARKER_DECL_VIRT(TGraphPolar)+TOBJECT_DECL_VIRT(TGraphPolar)+DELETABLE_DECL_VIRT(TGraphPolar)+TGRAPHPOLAR_DECL_VIRT(TGraphPolar)+TGRAPHPOLAR_DECL_NONVIRT(TGraphPolar)+TGRAPHPOLAR_DECL_ACCESSOR(TGraphPolar)  #ifdef __cplusplus }
csrc/HROOTGrafTGraphQQ.cpp view
@@ -1,17 +1,20 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"+ #include "HROOTHistTGraph.h"+ #include "TGraphQQ.h"-#include "HROOTGrafTGraphQQ.h" +#include "HROOTGrafTGraphQQ.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)  #define TYPECASTMETHOD(cname,mname,oname) \-  IIF( CHECKPROTECT(cname,mname) ) ( \-  (to_nonconst<oname,cname ## _t>), \-  (to_nonconst<cname,cname ## _t>) )-+  FXIIF( CHECKPROTECT(cname,mname) ) ( \+  (from_nonconst_to_nonconst<oname,cname ## _t>), \+  (from_nonconst_to_nonconst<cname,cname ## _t>) )  TGRAPH_DEF_VIRT(TGraphQQ) TNAMED_DEF_VIRT(TGraphQQ)@@ -20,8 +23,7 @@ TATTMARKER_DEF_VIRT(TGraphQQ) TOBJECT_DEF_VIRT(TGraphQQ) DELETABLE_DEF_VIRT(TGraphQQ)- TGRAPHQQ_DEF_VIRT(TGraphQQ)- TGRAPHQQ_DEF_NONVIRT(TGraphQQ)+TGRAPHQQ_DEF_ACCESSOR(TGraphQQ) 
csrc/HROOTGrafTGraphQQ.h view
@@ -1,56 +1,66 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_GRAF__TGraphQQ__-#define __HROOT_GRAF__TGraphQQ__+#pragma once + #include "HROOT-grafType.h"+ #include "HROOTHistTGraph.h"+ #include "HROOTCoreTNamed.h"+ #include "HROOTCoreTAttLine.h"+ #include "HROOTCoreTAttFill.h"+ #include "HROOTCoreTAttMarker.h"+ #include "HROOTCoreTObject.h"-#include "HROOTCoreDeletable.h"++#include "STDDeletable.h"+ #include "HROOT-histType.h" -#undef TGRAPHQQ_DECL_VIRT + #define TGRAPHQQ_DECL_VIRT(Type) \  -#undef TGRAPHQQ_DECL_NONVIRT + #define TGRAPHQQ_DECL_NONVIRT(Type) \-Type ## _p Type ## _newTGraphQQ ( int nx, double * x, int ny, double * y )+Type##_p Type##_newTGraphQQ ( int nx, double* x, int ny, double* y ); -#undef TGRAPHQQ_DEF_VIRT-#define TGRAPHQQ_DEF_VIRT(Type)\ +#define TGRAPHQQ_DECL_ACCESSOR(Type) \ -#undef TGRAPHQQ_DEF_NONVIRT-#define TGRAPHQQ_DEF_NONVIRT(Type)\-Type ## _p Type ## _newTGraphQQ ( int nx, double * x, int ny, double * y )\-{\-Type * newp = new Type (nx, x, ny, y); \-return to_nonconst<Type ## _t, Type >(newp);\-} -TGRAPH_DECL_VIRT(TGraphQQ);-TNAMED_DECL_VIRT(TGraphQQ);-TATTLINE_DECL_VIRT(TGraphQQ);-TATTFILL_DECL_VIRT(TGraphQQ);-TATTMARKER_DECL_VIRT(TGraphQQ);-TOBJECT_DECL_VIRT(TGraphQQ);-DELETABLE_DECL_VIRT(TGraphQQ); +#define TGRAPHQQ_DEF_VIRT(Type) \ -TGRAPHQQ_DECL_VIRT(TGraphQQ);  -TGRAPHQQ_DECL_NONVIRT(TGraphQQ);+#define TGRAPHQQ_DEF_NONVIRT(Type) \+Type##_p Type##_newTGraphQQ ( int nx, double* x, int ny, double* y ) {\+Type* newp=new Type(nx, x, ny, y);return from_nonconst_to_nonconst<Type##_t, Type>(newp);\+}  -#endif // __HROOT_GRAF__TGraphQQ__+#define TGRAPHQQ_DEF_ACCESSOR(Type) \++++TGRAPH_DECL_VIRT(TGraphQQ)+TNAMED_DECL_VIRT(TGraphQQ)+TATTLINE_DECL_VIRT(TGraphQQ)+TATTFILL_DECL_VIRT(TGraphQQ)+TATTMARKER_DECL_VIRT(TGraphQQ)+TOBJECT_DECL_VIRT(TGraphQQ)+DELETABLE_DECL_VIRT(TGraphQQ)+TGRAPHQQ_DECL_VIRT(TGraphQQ)+TGRAPHQQ_DECL_NONVIRT(TGraphQQ)+TGRAPHQQ_DECL_ACCESSOR(TGraphQQ)  #ifdef __cplusplus }
csrc/HROOTGrafTLine.cpp view
@@ -1,24 +1,27 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"+ #include "HROOTCoreTObject.h"+ #include "HROOTCoreTAttLine.h"+ #include "TLine.h"-#include "HROOTGrafTLine.h" +#include "HROOTGrafTLine.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)  #define TYPECASTMETHOD(cname,mname,oname) \-  IIF( CHECKPROTECT(cname,mname) ) ( \-  (to_nonconst<oname,cname ## _t>), \-  (to_nonconst<cname,cname ## _t>) )-+  FXIIF( CHECKPROTECT(cname,mname) ) ( \+  (from_nonconst_to_nonconst<oname,cname ## _t>), \+  (from_nonconst_to_nonconst<cname,cname ## _t>) )  TOBJECT_DEF_VIRT(TLine) TATTLINE_DEF_VIRT(TLine) DELETABLE_DEF_VIRT(TLine)- TLINE_DEF_VIRT(TLine)- TLINE_DEF_NONVIRT(TLine)+TLINE_DEF_ACCESSOR(TLine) 
csrc/HROOTGrafTLine.h view
@@ -1,126 +1,131 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_GRAF__TLine__-#define __HROOT_GRAF__TLine__+#pragma once + #include "HROOT-grafType.h"+ #include "HROOTCoreTObject.h"+ #include "HROOTCoreTAttLine.h"-#include "HROOTCoreDeletable.h"++#include "STDDeletable.h"+ #include "HROOT-coreType.h" -#undef TLINE_DECL_VIRT + #define TLINE_DECL_VIRT(Type) \-TLine_p Type ## _DrawLine ( Type ## _p p, double x1, double y1, double x2, double y2 ); \-TLine_p Type ## _DrawLineNDC ( Type ## _p p, double x1, double y1, double x2, double y2 ); \-void Type ## _PaintLine ( Type ## _p p, double x1, double y1, double x2, double y2 ); \-void Type ## _PaintLineNDC ( Type ## _p p, double u1, double v1, double u2, double v2 ); \-void Type ## _SetX1 ( Type ## _p p, double x1 ); \-void Type ## _SetX2 ( Type ## _p p, double x2 ); \-void Type ## _SetY1 ( Type ## _p p, double y1 ); \-void Type ## _SetY2 ( Type ## _p p, double y2 )+TLine_p Type##_DrawLine ( Type##_p p, double x1, double y1, double x2, double y2 );\+TLine_p Type##_DrawLineNDC ( Type##_p p, double x1, double y1, double x2, double y2 );\+void Type##_PaintLine ( Type##_p p, double x1, double y1, double x2, double y2 );\+void Type##_PaintLineNDC ( Type##_p p, double u1, double v1, double u2, double v2 );\+void Type##_SetX1 ( Type##_p p, double x1 );\+void Type##_SetX2 ( Type##_p p, double x2 );\+void Type##_SetY1 ( Type##_p p, double y1 );\+void Type##_SetY2 ( Type##_p p, double y2 ); -#undef TLINE_DECL_NONVIRT + #define TLINE_DECL_NONVIRT(Type) \-Type ## _p Type ## _newTLine ( double x1, double y1, double x2, double y2 ); \-double Type ## _tLineGetX1 ( Type ## _p p ); \-double Type ## _tLineGetX2 ( Type ## _p p ); \-double Type ## _tLineGetY1 ( Type ## _p p ); \-double Type ## _tLineGetY2 ( Type ## _p p ); \-int Type ## _tLineIsHorizontal ( Type ## _p p ); \-int Type ## _tLineIsVertical ( Type ## _p p ); \-void Type ## _tLineSetHorizontal ( Type ## _p p, int set ); \-void Type ## _tLineSetVertical ( Type ## _p p, int set )+Type##_p Type##_newTLine ( double x1, double y1, double x2, double y2 );\+double Type##_tLine_GetX1 ( Type##_p p );\+double Type##_tLine_GetX2 ( Type##_p p );\+double Type##_tLine_GetY1 ( Type##_p p );\+double Type##_tLine_GetY2 ( Type##_p p );\+bool Type##_tLine_IsHorizontal ( Type##_p p );\+bool Type##_tLine_IsVertical ( Type##_p p );\+void Type##_tLine_SetHorizontal ( Type##_p p, bool set );\+void Type##_tLine_SetVertical ( Type##_p p, bool set ); -#undef TLINE_DEF_VIRT-#define TLINE_DEF_VIRT(Type)\-TLine_p Type ## _DrawLine ( Type ## _p p, double x1, double y1, double x2, double y2 )\-{\-return to_nonconst<TLine_t,TLine>((TLine*)TYPECASTMETHOD(Type,DrawLine,TLine)(p)->DrawLine(x1, y1, x2, y2));\++#define TLINE_DECL_ACCESSOR(Type) \++++#define TLINE_DEF_VIRT(Type) \+TLine_p Type##_DrawLine ( Type##_p p, double x1, double y1, double x2, double y2 ) {\+return from_nonconst_to_nonconst<TLine_t, TLine>((TLine*)((TYPECASTMETHOD(Type, DrawLine, TLine))(p))->DrawLine(x1, y1, x2, y2));\ }\-TLine_p Type ## _DrawLineNDC ( Type ## _p p, double x1, double y1, double x2, double y2 )\-{\-return to_nonconst<TLine_t,TLine>((TLine*)TYPECASTMETHOD(Type,DrawLineNDC,TLine)(p)->DrawLineNDC(x1, y1, x2, y2));\+\+TLine_p Type##_DrawLineNDC ( Type##_p p, double x1, double y1, double x2, double y2 ) {\+return from_nonconst_to_nonconst<TLine_t, TLine>((TLine*)((TYPECASTMETHOD(Type, DrawLineNDC, TLine))(p))->DrawLineNDC(x1, y1, x2, y2));\ }\-void Type ## _PaintLine ( Type ## _p p, double x1, double y1, double x2, double y2 )\-{\-TYPECASTMETHOD(Type,PaintLine,TLine)(p)->PaintLine(x1, y1, x2, y2);\+\+void Type##_PaintLine ( Type##_p p, double x1, double y1, double x2, double y2 ) {\+((TYPECASTMETHOD(Type, PaintLine, TLine))(p))->PaintLine(x1, y1, x2, y2);\ }\-void Type ## _PaintLineNDC ( Type ## _p p, double u1, double v1, double u2, double v2 )\-{\-TYPECASTMETHOD(Type,PaintLineNDC,TLine)(p)->PaintLineNDC(u1, v1, u2, v2);\+\+void Type##_PaintLineNDC ( Type##_p p, double u1, double v1, double u2, double v2 ) {\+((TYPECASTMETHOD(Type, PaintLineNDC, TLine))(p))->PaintLineNDC(u1, v1, u2, v2);\ }\-void Type ## _SetX1 ( Type ## _p p, double x1 )\-{\-TYPECASTMETHOD(Type,SetX1,TLine)(p)->SetX1(x1);\+\+void Type##_SetX1 ( Type##_p p, double x1 ) {\+((TYPECASTMETHOD(Type, SetX1, TLine))(p))->SetX1(x1);\ }\-void Type ## _SetX2 ( Type ## _p p, double x2 )\-{\-TYPECASTMETHOD(Type,SetX2,TLine)(p)->SetX2(x2);\+\+void Type##_SetX2 ( Type##_p p, double x2 ) {\+((TYPECASTMETHOD(Type, SetX2, TLine))(p))->SetX2(x2);\ }\-void Type ## _SetY1 ( Type ## _p p, double y1 )\-{\-TYPECASTMETHOD(Type,SetY1,TLine)(p)->SetY1(y1);\+\+void Type##_SetY1 ( Type##_p p, double y1 ) {\+((TYPECASTMETHOD(Type, SetY1, TLine))(p))->SetY1(y1);\ }\-void Type ## _SetY2 ( Type ## _p p, double y2 )\-{\-TYPECASTMETHOD(Type,SetY2,TLine)(p)->SetY2(y2);\+\+void Type##_SetY2 ( Type##_p p, double y2 ) {\+((TYPECASTMETHOD(Type, SetY2, TLine))(p))->SetY2(y2);\ } -#undef TLINE_DEF_NONVIRT-#define TLINE_DEF_NONVIRT(Type)\-Type ## _p Type ## _newTLine ( double x1, double y1, double x2, double y2 )\-{\-Type * newp = new Type (x1, y1, x2, y2); \-return to_nonconst<Type ## _t, Type >(newp);\++#define TLINE_DEF_NONVIRT(Type) \+Type##_p Type##_newTLine ( double x1, double y1, double x2, double y2 ) {\+Type* newp=new Type(x1, y1, x2, y2);return from_nonconst_to_nonconst<Type##_t, Type>(newp);\ }\-double Type ## _tLineGetX1 ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,tLineGetX1,TLine)(p)->GetX1();\+\+double Type##_tLine_GetX1 ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, tLine_GetX1, TLine))(p))->GetX1();\ }\-double Type ## _tLineGetX2 ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,tLineGetX2,TLine)(p)->GetX2();\+\+double Type##_tLine_GetX2 ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, tLine_GetX2, TLine))(p))->GetX2();\ }\-double Type ## _tLineGetY1 ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,tLineGetY1,TLine)(p)->GetY1();\+\+double Type##_tLine_GetY1 ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, tLine_GetY1, TLine))(p))->GetY1();\ }\-double Type ## _tLineGetY2 ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,tLineGetY2,TLine)(p)->GetY2();\+\+double Type##_tLine_GetY2 ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, tLine_GetY2, TLine))(p))->GetY2();\ }\-int Type ## _tLineIsHorizontal ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,tLineIsHorizontal,TLine)(p)->IsHorizontal();\+\+bool Type##_tLine_IsHorizontal ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, tLine_IsHorizontal, TLine))(p))->IsHorizontal();\ }\-int Type ## _tLineIsVertical ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,tLineIsVertical,TLine)(p)->IsVertical();\+\+bool Type##_tLine_IsVertical ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, tLine_IsVertical, TLine))(p))->IsVertical();\ }\-void Type ## _tLineSetHorizontal ( Type ## _p p, int set )\-{\-TYPECASTMETHOD(Type,tLineSetHorizontal,TLine)(p)->SetHorizontal(set);\+\+void Type##_tLine_SetHorizontal ( Type##_p p, bool set ) {\+((TYPECASTMETHOD(Type, tLine_SetHorizontal, TLine))(p))->SetHorizontal(set);\ }\-void Type ## _tLineSetVertical ( Type ## _p p, int set )\-{\-TYPECASTMETHOD(Type,tLineSetVertical,TLine)(p)->SetVertical(set);\+\+void Type##_tLine_SetVertical ( Type##_p p, bool set ) {\+((TYPECASTMETHOD(Type, tLine_SetVertical, TLine))(p))->SetVertical(set);\ } -TOBJECT_DECL_VIRT(TLine);-TATTLINE_DECL_VIRT(TLine);-DELETABLE_DECL_VIRT(TLine); +#define TLINE_DEF_ACCESSOR(Type) \ -TLINE_DECL_VIRT(TLine);  -TLINE_DECL_NONVIRT(TLine);---#endif // __HROOT_GRAF__TLine__+TOBJECT_DECL_VIRT(TLine)+TATTLINE_DECL_VIRT(TLine)+DELETABLE_DECL_VIRT(TLine)+TLINE_DECL_VIRT(TLine)+TLINE_DECL_NONVIRT(TLine)+TLINE_DECL_ACCESSOR(TLine)  #ifdef __cplusplus }
+ csrc/HROOTGrafTMarker.cpp view
@@ -0,0 +1,30 @@++#include "MacroPatternMatch.h"++#include "HROOTCoreTObject.h"++#include "HROOTCoreTAttMarker.h"++#include "HROOTCoreTAttBBox2D.h"++#include "TMarker.h"++#include "HROOTGrafTMarker.h"++using namespace ROOT;++#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)++#define TYPECASTMETHOD(cname,mname,oname) \+  FXIIF( CHECKPROTECT(cname,mname) ) ( \+  (from_nonconst_to_nonconst<oname,cname ## _t>), \+  (from_nonconst_to_nonconst<cname,cname ## _t>) )++TOBJECT_DEF_VIRT(TMarker)+TATTMARKER_DEF_VIRT(TMarker)+TATTBBOX2D_DEF_VIRT(TMarker)+DELETABLE_DEF_VIRT(TMarker)+TMARKER_DEF_VIRT(TMarker)+TMARKER_DEF_NONVIRT(TMarker)+TMARKER_DEF_ACCESSOR(TMarker)+
+ csrc/HROOTGrafTMarker.h view
@@ -0,0 +1,76 @@++#ifdef __cplusplus+extern "C" {+#endif++#pragma once+++#include "HROOT-grafType.h"++#include "HROOTCoreTObject.h"++#include "HROOTCoreTAttMarker.h"++#include "HROOTCoreTAttBBox2D.h"++#include "STDDeletable.h"++#include "HROOT-coreType.h"+++#define TMARKER_DECL_VIRT(Type) \+void Type##_SetX ( Type##_p p, double x );\+void Type##_SetY ( Type##_p p, double y );+++#define TMARKER_DECL_NONVIRT(Type) \+Type##_p Type##_newTMarker ( double x, double y, int marker );\+double Type##_tMarker_GetX ( Type##_p p );\+double Type##_tMarker_GetY ( Type##_p p );+++#define TMARKER_DECL_ACCESSOR(Type) \++++#define TMARKER_DEF_VIRT(Type) \+void Type##_SetX ( Type##_p p, double x ) {\+((TYPECASTMETHOD(Type, SetX, TMarker))(p))->SetX(x);\+}\+\+void Type##_SetY ( Type##_p p, double y ) {\+((TYPECASTMETHOD(Type, SetY, TMarker))(p))->SetY(y);\+}+++#define TMARKER_DEF_NONVIRT(Type) \+Type##_p Type##_newTMarker ( double x, double y, int marker ) {\+Type* newp=new Type(x, y, marker);return from_nonconst_to_nonconst<Type##_t, Type>(newp);\+}\+\+double Type##_tMarker_GetX ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, tMarker_GetX, TMarker))(p))->GetX();\+}\+\+double Type##_tMarker_GetY ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, tMarker_GetY, TMarker))(p))->GetY();\+}+++#define TMARKER_DEF_ACCESSOR(Type) \++++TOBJECT_DECL_VIRT(TMarker)+TATTMARKER_DECL_VIRT(TMarker)+TATTBBOX2D_DECL_VIRT(TMarker)+DELETABLE_DECL_VIRT(TMarker)+TMARKER_DECL_VIRT(TMarker)+TMARKER_DECL_NONVIRT(TMarker)+TMARKER_DECL_ACCESSOR(TMarker)++#ifdef __cplusplus+}+#endif+
csrc/HROOTGrafTPCON.cpp view
@@ -1,17 +1,20 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"+ #include "HROOTGrafTShape.h"+ #include "TPCON.h"-#include "HROOTGrafTPCON.h" +#include "HROOTGrafTPCON.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)  #define TYPECASTMETHOD(cname,mname,oname) \-  IIF( CHECKPROTECT(cname,mname) ) ( \-  (to_nonconst<oname,cname ## _t>), \-  (to_nonconst<cname,cname ## _t>) )-+  FXIIF( CHECKPROTECT(cname,mname) ) ( \+  (from_nonconst_to_nonconst<oname,cname ## _t>), \+  (from_nonconst_to_nonconst<cname,cname ## _t>) )  TSHAPE_DEF_VIRT(TPCON) TNAMED_DEF_VIRT(TPCON)@@ -20,8 +23,7 @@ TATT3D_DEF_VIRT(TPCON) TOBJECT_DEF_VIRT(TPCON) DELETABLE_DEF_VIRT(TPCON)- TPCON_DEF_VIRT(TPCON)- TPCON_DEF_NONVIRT(TPCON)+TPCON_DEF_ACCESSOR(TPCON) 
csrc/HROOTGrafTPCON.h view
@@ -1,55 +1,64 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_GRAF__TPCON__-#define __HROOT_GRAF__TPCON__+#pragma once + #include "HROOT-grafType.h"+ #include "HROOTGrafTShape.h"+ #include "HROOTCoreTNamed.h"+ #include "HROOTCoreTAttLine.h"+ #include "HROOTCoreTAttFill.h"+ #include "HROOTCoreTAtt3D.h"+ #include "HROOTCoreTObject.h"-#include "HROOTCoreDeletable.h" -#undef TPCON_DECL_VIRT +#include "STDDeletable.h"++ #define TPCON_DECL_VIRT(Type) \  -#undef TPCON_DECL_NONVIRT + #define TPCON_DECL_NONVIRT(Type) \-Type ## _p Type ## _newTPCON ( const char* name, const char* title, const char* material, double phi1, double dphi1, int nz )+Type##_p Type##_newTPCON ( const char* name, const char* title, const char* material, float phi1, float dphi1, int nz ); -#undef TPCON_DEF_VIRT-#define TPCON_DEF_VIRT(Type)\ +#define TPCON_DECL_ACCESSOR(Type) \ -#undef TPCON_DEF_NONVIRT-#define TPCON_DEF_NONVIRT(Type)\-Type ## _p Type ## _newTPCON ( const char* name, const char* title, const char* material, double phi1, double dphi1, int nz )\-{\-Type * newp = new Type (name, title, material, phi1, dphi1, nz); \-return to_nonconst<Type ## _t, Type >(newp);\-} -TSHAPE_DECL_VIRT(TPCON);-TNAMED_DECL_VIRT(TPCON);-TATTLINE_DECL_VIRT(TPCON);-TATTFILL_DECL_VIRT(TPCON);-TATT3D_DECL_VIRT(TPCON);-TOBJECT_DECL_VIRT(TPCON);-DELETABLE_DECL_VIRT(TPCON); +#define TPCON_DEF_VIRT(Type) \ -TPCON_DECL_VIRT(TPCON);  -TPCON_DECL_NONVIRT(TPCON);+#define TPCON_DEF_NONVIRT(Type) \+Type##_p Type##_newTPCON ( const char* name, const char* title, const char* material, float phi1, float dphi1, int nz ) {\+Type* newp=new Type(name, title, material, phi1, dphi1, nz);return from_nonconst_to_nonconst<Type##_t, Type>(newp);\+}  -#endif // __HROOT_GRAF__TPCON__+#define TPCON_DEF_ACCESSOR(Type) \++++TSHAPE_DECL_VIRT(TPCON)+TNAMED_DECL_VIRT(TPCON)+TATTLINE_DECL_VIRT(TPCON)+TATTFILL_DECL_VIRT(TPCON)+TATT3D_DECL_VIRT(TPCON)+TOBJECT_DECL_VIRT(TPCON)+DELETABLE_DECL_VIRT(TPCON)+TPCON_DECL_VIRT(TPCON)+TPCON_DECL_NONVIRT(TPCON)+TPCON_DECL_ACCESSOR(TPCON)  #ifdef __cplusplus }
csrc/HROOTGrafTPad.cpp view
@@ -1,23 +1,33 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"++#include "HROOTHistTH1F.h"++#include "HROOTGrafTView.h"+ #include "HROOTCoreTVirtualPad.h"+ #include "TPad.h"-#include "HROOTGrafTPad.h" +#include "HROOTGrafTPad.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)  #define TYPECASTMETHOD(cname,mname,oname) \-  IIF( CHECKPROTECT(cname,mname) ) ( \-  (to_nonconst<oname,cname ## _t>), \-  (to_nonconst<cname,cname ## _t>) )-+  FXIIF( CHECKPROTECT(cname,mname) ) ( \+  (from_nonconst_to_nonconst<oname,cname ## _t>), \+  (from_nonconst_to_nonconst<cname,cname ## _t>) )  TVIRTUALPAD_DEF_VIRT(TPad) TOBJECT_DEF_VIRT(TPad)+TATTLINE_DEF_VIRT(TPad)+TATTFILL_DEF_VIRT(TPad)+TATTPAD_DEF_VIRT(TPad)+TQOBJECT_DEF_VIRT(TPad) DELETABLE_DEF_VIRT(TPad)- TPAD_DEF_VIRT(TPad)- TPAD_DEF_NONVIRT(TPad)+TPAD_DEF_ACCESSOR(TPad) 
csrc/HROOTGrafTPad.h view
@@ -1,44 +1,85 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_GRAF__TPad__-#define __HROOT_GRAF__TPad__+#pragma once + #include "HROOT-grafType.h"+ #include "HROOTCoreTVirtualPad.h"+ #include "HROOTCoreTObject.h"-#include "HROOTCoreDeletable.h"++#include "HROOTCoreTAttLine.h"++#include "HROOTCoreTAttFill.h"++#include "HROOTCoreTAttPad.h"++#include "HROOTCoreTQObject.h"++#include "STDDeletable.h"++#include "HROOT-histType.h"+ #include "HROOT-coreType.h" -#undef TPAD_DECL_VIRT + #define TPAD_DECL_VIRT(Type) \+TH1F_p Type##_DrawFrame ( Type##_p p, double xmin, double ymin, double xmax, double ymax, const char* title );\+TView_p Type##_GetView ( Type##_p p );\+void Type##_SetView0 ( Type##_p p );\+void Type##_SetView ( Type##_p p, TView_p view );  -#undef TPAD_DECL_NONVIRT  #define TPAD_DECL_NONVIRT(Type) \+Type##_p Type##_newTPad ( const char* name, const char* title, double xlow, double ylow, double xup, double yup );  -#undef TPAD_DEF_VIRT-#define TPAD_DEF_VIRT(Type)\+#define TPAD_DECL_ACCESSOR(Type) \  -#undef TPAD_DEF_NONVIRT-#define TPAD_DEF_NONVIRT(Type)\ +#define TPAD_DEF_VIRT(Type) \+TH1F_p Type##_DrawFrame ( Type##_p p, double xmin, double ymin, double xmax, double ymax, const char* title ) {\+return from_nonconst_to_nonconst<TH1F_t, TH1F>((TH1F*)((TYPECASTMETHOD(Type, DrawFrame, TPad))(p))->DrawFrame(xmin, ymin, xmax, ymax, title));\+}\+\+TView_p Type##_GetView ( Type##_p p ) {\+return from_nonconst_to_nonconst<TView_t, TView>((TView*)((TYPECASTMETHOD(Type, GetView, TPad))(p))->GetView());\+}\+\+void Type##_SetView0 ( Type##_p p ) {\+((TYPECASTMETHOD(Type, SetView0, TPad))(p))->SetView();\+}\+\+void Type##_SetView ( Type##_p p, TView_p view ) {\+((TYPECASTMETHOD(Type, SetView, TPad))(p))->SetView(from_nonconst_to_nonconst<TView, TView_t>(view));\+} -TVIRTUALPAD_DECL_VIRT(TPad);-TOBJECT_DECL_VIRT(TPad);-DELETABLE_DECL_VIRT(TPad); +#define TPAD_DEF_NONVIRT(Type) \+Type##_p Type##_newTPad ( const char* name, const char* title, double xlow, double ylow, double xup, double yup ) {\+Type* newp=new Type(name, title, xlow, ylow, xup, yup);return from_nonconst_to_nonconst<Type##_t, Type>(newp);\+} -TPAD_DECL_VIRT(TPad); +#define TPAD_DEF_ACCESSOR(Type) \ -TPAD_DECL_NONVIRT(TPad);  -#endif // __HROOT_GRAF__TPad__+TVIRTUALPAD_DECL_VIRT(TPad)+TOBJECT_DECL_VIRT(TPad)+TATTLINE_DECL_VIRT(TPad)+TATTFILL_DECL_VIRT(TPad)+TATTPAD_DECL_VIRT(TPad)+TQOBJECT_DECL_VIRT(TPad)+DELETABLE_DECL_VIRT(TPad)+TPAD_DECL_VIRT(TPad)+TPAD_DECL_NONVIRT(TPad)+TPAD_DECL_ACCESSOR(TPad)  #ifdef __cplusplus }
csrc/HROOTGrafTSPHE.cpp view
@@ -1,17 +1,20 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"+ #include "HROOTGrafTShape.h"+ #include "TSPHE.h"-#include "HROOTGrafTSPHE.h" +#include "HROOTGrafTSPHE.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)  #define TYPECASTMETHOD(cname,mname,oname) \-  IIF( CHECKPROTECT(cname,mname) ) ( \-  (to_nonconst<oname,cname ## _t>), \-  (to_nonconst<cname,cname ## _t>) )-+  FXIIF( CHECKPROTECT(cname,mname) ) ( \+  (from_nonconst_to_nonconst<oname,cname ## _t>), \+  (from_nonconst_to_nonconst<cname,cname ## _t>) )  TSHAPE_DEF_VIRT(TSPHE) TNAMED_DEF_VIRT(TSPHE)@@ -20,8 +23,7 @@ TATT3D_DEF_VIRT(TSPHE) TOBJECT_DEF_VIRT(TSPHE) DELETABLE_DEF_VIRT(TSPHE)- TSPHE_DEF_VIRT(TSPHE)- TSPHE_DEF_NONVIRT(TSPHE)+TSPHE_DEF_ACCESSOR(TSPHE) 
csrc/HROOTGrafTSPHE.h view
@@ -1,55 +1,64 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_GRAF__TSPHE__-#define __HROOT_GRAF__TSPHE__+#pragma once + #include "HROOT-grafType.h"+ #include "HROOTGrafTShape.h"+ #include "HROOTCoreTNamed.h"+ #include "HROOTCoreTAttLine.h"+ #include "HROOTCoreTAttFill.h"+ #include "HROOTCoreTAtt3D.h"+ #include "HROOTCoreTObject.h"-#include "HROOTCoreDeletable.h" -#undef TSPHE_DECL_VIRT +#include "STDDeletable.h"++ #define TSPHE_DECL_VIRT(Type) \  -#undef TSPHE_DECL_NONVIRT + #define TSPHE_DECL_NONVIRT(Type) \-Type ## _p Type ## _newTSPHE ( const char* name, const char* title, const char* material, double rmin, double rmax, double themin, double themax, double phimin, double phimax )+Type##_p Type##_newTSPHE ( const char* name, const char* title, const char* material, float rmin, float rmax, float themin, float themax, float phimin, float phimax ); -#undef TSPHE_DEF_VIRT-#define TSPHE_DEF_VIRT(Type)\ +#define TSPHE_DECL_ACCESSOR(Type) \ -#undef TSPHE_DEF_NONVIRT-#define TSPHE_DEF_NONVIRT(Type)\-Type ## _p Type ## _newTSPHE ( const char* name, const char* title, const char* material, double rmin, double rmax, double themin, double themax, double phimin, double phimax )\-{\-Type * newp = new Type (name, title, material, rmin, rmax, themin, themax, phimin, phimax); \-return to_nonconst<Type ## _t, Type >(newp);\-} -TSHAPE_DECL_VIRT(TSPHE);-TNAMED_DECL_VIRT(TSPHE);-TATTLINE_DECL_VIRT(TSPHE);-TATTFILL_DECL_VIRT(TSPHE);-TATT3D_DECL_VIRT(TSPHE);-TOBJECT_DECL_VIRT(TSPHE);-DELETABLE_DECL_VIRT(TSPHE); +#define TSPHE_DEF_VIRT(Type) \ -TSPHE_DECL_VIRT(TSPHE);  -TSPHE_DECL_NONVIRT(TSPHE);+#define TSPHE_DEF_NONVIRT(Type) \+Type##_p Type##_newTSPHE ( const char* name, const char* title, const char* material, float rmin, float rmax, float themin, float themax, float phimin, float phimax ) {\+Type* newp=new Type(name, title, material, rmin, rmax, themin, themax, phimin, phimax);return from_nonconst_to_nonconst<Type##_t, Type>(newp);\+}  -#endif // __HROOT_GRAF__TSPHE__+#define TSPHE_DEF_ACCESSOR(Type) \++++TSHAPE_DECL_VIRT(TSPHE)+TNAMED_DECL_VIRT(TSPHE)+TATTLINE_DECL_VIRT(TSPHE)+TATTFILL_DECL_VIRT(TSPHE)+TATT3D_DECL_VIRT(TSPHE)+TOBJECT_DECL_VIRT(TSPHE)+DELETABLE_DECL_VIRT(TSPHE)+TSPHE_DECL_VIRT(TSPHE)+TSPHE_DECL_NONVIRT(TSPHE)+TSPHE_DECL_ACCESSOR(TSPHE)  #ifdef __cplusplus }
csrc/HROOTGrafTShape.cpp view
@@ -1,20 +1,26 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"+ #include "HROOTCoreTNamed.h"+ #include "HROOTCoreTAttLine.h"+ #include "HROOTCoreTAttFill.h"+ #include "HROOTCoreTAtt3D.h"+ #include "TShape.h"-#include "HROOTGrafTShape.h" +#include "HROOTGrafTShape.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)  #define TYPECASTMETHOD(cname,mname,oname) \-  IIF( CHECKPROTECT(cname,mname) ) ( \-  (to_nonconst<oname,cname ## _t>), \-  (to_nonconst<cname,cname ## _t>) )-+  FXIIF( CHECKPROTECT(cname,mname) ) ( \+  (from_nonconst_to_nonconst<oname,cname ## _t>), \+  (from_nonconst_to_nonconst<cname,cname ## _t>) )  TNAMED_DEF_VIRT(TShape) TATTLINE_DEF_VIRT(TShape)@@ -22,8 +28,7 @@ TATT3D_DEF_VIRT(TShape) TOBJECT_DEF_VIRT(TShape) DELETABLE_DEF_VIRT(TShape)- TSHAPE_DEF_VIRT(TShape)- TSHAPE_DEF_NONVIRT(TShape)+TSHAPE_DEF_ACCESSOR(TShape) 
csrc/HROOTGrafTShape.h view
@@ -1,54 +1,63 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_GRAF__TShape__-#define __HROOT_GRAF__TShape__+#pragma once + #include "HROOT-grafType.h"+ #include "HROOTCoreTNamed.h"+ #include "HROOTCoreTAttLine.h"+ #include "HROOTCoreTAttFill.h"+ #include "HROOTCoreTAtt3D.h"+ #include "HROOTCoreTObject.h"-#include "HROOTCoreDeletable.h"++#include "STDDeletable.h"+ #include "HROOT-coreType.h" -#undef TSHAPE_DECL_VIRT + #define TSHAPE_DECL_VIRT(Type) \  -#undef TSHAPE_DECL_NONVIRT + #define TSHAPE_DECL_NONVIRT(Type) \-Type ## _p Type ## _newTShape ( const char* name, const char* title, const char* material )+Type##_p Type##_newTShape ( const char* name, const char* title, const char* material ); -#undef TSHAPE_DEF_VIRT-#define TSHAPE_DEF_VIRT(Type)\ +#define TSHAPE_DECL_ACCESSOR(Type) \ -#undef TSHAPE_DEF_NONVIRT-#define TSHAPE_DEF_NONVIRT(Type)\-Type ## _p Type ## _newTShape ( const char* name, const char* title, const char* material )\-{\-Type * newp = new Type (name, title, material); \-return to_nonconst<Type ## _t, Type >(newp);\-} -TNAMED_DECL_VIRT(TShape);-TATTLINE_DECL_VIRT(TShape);-TATTFILL_DECL_VIRT(TShape);-TATT3D_DECL_VIRT(TShape);-TOBJECT_DECL_VIRT(TShape);-DELETABLE_DECL_VIRT(TShape); +#define TSHAPE_DEF_VIRT(Type) \ -TSHAPE_DECL_VIRT(TShape);  -TSHAPE_DECL_NONVIRT(TShape);+#define TSHAPE_DEF_NONVIRT(Type) \+Type##_p Type##_newTShape ( const char* name, const char* title, const char* material ) {\+Type* newp=new Type(name, title, material);return from_nonconst_to_nonconst<Type##_t, Type>(newp);\+}  -#endif // __HROOT_GRAF__TShape__+#define TSHAPE_DEF_ACCESSOR(Type) \++++TNAMED_DECL_VIRT(TShape)+TATTLINE_DECL_VIRT(TShape)+TATTFILL_DECL_VIRT(TShape)+TATT3D_DECL_VIRT(TShape)+TOBJECT_DECL_VIRT(TShape)+DELETABLE_DECL_VIRT(TShape)+TSHAPE_DECL_VIRT(TShape)+TSHAPE_DECL_NONVIRT(TShape)+TSHAPE_DECL_ACCESSOR(TShape)  #ifdef __cplusplus }
csrc/HROOTGrafTTUBE.cpp view
@@ -1,17 +1,20 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"+ #include "HROOTGrafTShape.h"+ #include "TTUBE.h"-#include "HROOTGrafTTUBE.h" +#include "HROOTGrafTTUBE.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)  #define TYPECASTMETHOD(cname,mname,oname) \-  IIF( CHECKPROTECT(cname,mname) ) ( \-  (to_nonconst<oname,cname ## _t>), \-  (to_nonconst<cname,cname ## _t>) )-+  FXIIF( CHECKPROTECT(cname,mname) ) ( \+  (from_nonconst_to_nonconst<oname,cname ## _t>), \+  (from_nonconst_to_nonconst<cname,cname ## _t>) )  TSHAPE_DEF_VIRT(TTUBE) TNAMED_DEF_VIRT(TTUBE)@@ -20,8 +23,7 @@ TATT3D_DEF_VIRT(TTUBE) TOBJECT_DEF_VIRT(TTUBE) DELETABLE_DEF_VIRT(TTUBE)- TTUBE_DEF_VIRT(TTUBE)- TTUBE_DEF_NONVIRT(TTUBE)+TTUBE_DEF_ACCESSOR(TTUBE) 
csrc/HROOTGrafTTUBE.h view
@@ -1,55 +1,64 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_GRAF__TTUBE__-#define __HROOT_GRAF__TTUBE__+#pragma once + #include "HROOT-grafType.h"+ #include "HROOTGrafTShape.h"+ #include "HROOTCoreTNamed.h"+ #include "HROOTCoreTAttLine.h"+ #include "HROOTCoreTAttFill.h"+ #include "HROOTCoreTAtt3D.h"+ #include "HROOTCoreTObject.h"-#include "HROOTCoreDeletable.h" -#undef TTUBE_DECL_VIRT +#include "STDDeletable.h"++ #define TTUBE_DECL_VIRT(Type) \  -#undef TTUBE_DECL_NONVIRT + #define TTUBE_DECL_NONVIRT(Type) \-Type ## _p Type ## _newTTUBE ( const char* name, const char* title, const char* material, double rmin, double rmax, double dz, double aspect )+Type##_p Type##_newTTUBE ( const char* name, const char* title, const char* material, float rmin, float rmax, float dz, float aspect ); -#undef TTUBE_DEF_VIRT-#define TTUBE_DEF_VIRT(Type)\ +#define TTUBE_DECL_ACCESSOR(Type) \ -#undef TTUBE_DEF_NONVIRT-#define TTUBE_DEF_NONVIRT(Type)\-Type ## _p Type ## _newTTUBE ( const char* name, const char* title, const char* material, double rmin, double rmax, double dz, double aspect )\-{\-Type * newp = new Type (name, title, material, rmin, rmax, dz, aspect); \-return to_nonconst<Type ## _t, Type >(newp);\-} -TSHAPE_DECL_VIRT(TTUBE);-TNAMED_DECL_VIRT(TTUBE);-TATTLINE_DECL_VIRT(TTUBE);-TATTFILL_DECL_VIRT(TTUBE);-TATT3D_DECL_VIRT(TTUBE);-TOBJECT_DECL_VIRT(TTUBE);-DELETABLE_DECL_VIRT(TTUBE); +#define TTUBE_DEF_VIRT(Type) \ -TTUBE_DECL_VIRT(TTUBE);  -TTUBE_DECL_NONVIRT(TTUBE);+#define TTUBE_DEF_NONVIRT(Type) \+Type##_p Type##_newTTUBE ( const char* name, const char* title, const char* material, float rmin, float rmax, float dz, float aspect ) {\+Type* newp=new Type(name, title, material, rmin, rmax, dz, aspect);return from_nonconst_to_nonconst<Type##_t, Type>(newp);\+}  -#endif // __HROOT_GRAF__TTUBE__+#define TTUBE_DEF_ACCESSOR(Type) \++++TSHAPE_DECL_VIRT(TTUBE)+TNAMED_DECL_VIRT(TTUBE)+TATTLINE_DECL_VIRT(TTUBE)+TATTFILL_DECL_VIRT(TTUBE)+TATT3D_DECL_VIRT(TTUBE)+TOBJECT_DECL_VIRT(TTUBE)+DELETABLE_DECL_VIRT(TTUBE)+TTUBE_DECL_VIRT(TTUBE)+TTUBE_DECL_NONVIRT(TTUBE)+TTUBE_DECL_ACCESSOR(TTUBE)  #ifdef __cplusplus }
+ csrc/HROOTGrafTView.cpp view
@@ -0,0 +1,29 @@++#include "MacroPatternMatch.h"++#include "HROOTCoreTVirtualPad.h"++#include "HROOTCoreTObject.h"++#include "HROOTCoreTAttLine.h"++#include "TView.h"++#include "HROOTGrafTView.h"++using namespace ROOT;++#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)++#define TYPECASTMETHOD(cname,mname,oname) \+  FXIIF( CHECKPROTECT(cname,mname) ) ( \+  (from_nonconst_to_nonconst<oname,cname ## _t>), \+  (from_nonconst_to_nonconst<cname,cname ## _t>) )++TOBJECT_DEF_VIRT(TView)+TATTLINE_DEF_VIRT(TView)+DELETABLE_DEF_VIRT(TView)+TVIEW_DEF_VIRT(TView)+TVIEW_DEF_NONVIRT(TView)+TVIEW_DEF_ACCESSOR(TView)+
+ csrc/HROOTGrafTView.h view
@@ -0,0 +1,131 @@++#ifdef __cplusplus+extern "C" {+#endif++#pragma once+++#include "HROOT-grafType.h"++#include "HROOTCoreTObject.h"++#include "HROOTCoreTAttLine.h"++#include "STDDeletable.h"++#include "HROOT-coreType.h"+++#define TVIEW_DECL_VIRT(Type) \+void Type##_Front ( Type##_p p );\+void Type##_FrontView ( Type##_p p, TVirtualPad_p pad );\+double Type##_GetLatitude ( Type##_p p );\+double Type##_GetLongitude ( Type##_p p );\+double Type##_GetPsi ( Type##_p p );\+bool Type##_IsViewChanged ( Type##_p p );\+void Type##_RotateView ( Type##_p p, double phi, double theta );\+void Type##_SetLatitude ( Type##_p p, double latitude );\+void Type##_SetLongitude ( Type##_p p, double longitude );\+void Type##_SetPsi ( Type##_p p, double psi );\+void Type##_SetView1 ( Type##_p p, double longitude, double latitude, double psi, int* irep );\+void Type##_SetViewChanged ( Type##_p p, bool flag );\+void Type##_Side ( Type##_p p );\+void Type##_SideView ( Type##_p p, TVirtualPad_p pad );\+void Type##_Top ( Type##_p p );\+void Type##_TopView ( Type##_p p, TVirtualPad_p pad );+++#define TVIEW_DECL_NONVIRT(Type) \++++#define TVIEW_DECL_ACCESSOR(Type) \++++#define TVIEW_DEF_VIRT(Type) \+void Type##_Front ( Type##_p p ) {\+((TYPECASTMETHOD(Type, Front, TView))(p))->Front();\+}\+\+void Type##_FrontView ( Type##_p p, TVirtualPad_p pad ) {\+((TYPECASTMETHOD(Type, FrontView, TView))(p))->FrontView(from_nonconst_to_nonconst<TVirtualPad, TVirtualPad_t>(pad));\+}\+\+double Type##_GetLatitude ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, GetLatitude, TView))(p))->GetLatitude();\+}\+\+double Type##_GetLongitude ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, GetLongitude, TView))(p))->GetLongitude();\+}\+\+double Type##_GetPsi ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, GetPsi, TView))(p))->GetPsi();\+}\+\+bool Type##_IsViewChanged ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, IsViewChanged, TView))(p))->IsViewChanged();\+}\+\+void Type##_RotateView ( Type##_p p, double phi, double theta ) {\+((TYPECASTMETHOD(Type, RotateView, TView))(p))->RotateView(phi, theta);\+}\+\+void Type##_SetLatitude ( Type##_p p, double latitude ) {\+((TYPECASTMETHOD(Type, SetLatitude, TView))(p))->SetLatitude(latitude);\+}\+\+void Type##_SetLongitude ( Type##_p p, double longitude ) {\+((TYPECASTMETHOD(Type, SetLongitude, TView))(p))->SetLongitude(longitude);\+}\+\+void Type##_SetPsi ( Type##_p p, double psi ) {\+((TYPECASTMETHOD(Type, SetPsi, TView))(p))->SetPsi(psi);\+}\+\+void Type##_SetView1 ( Type##_p p, double longitude, double latitude, double psi, int* irep ) {\+((TYPECASTMETHOD(Type, SetView1, TView))(p))->SetView(longitude, latitude, psi, *(irep));\+}\+\+void Type##_SetViewChanged ( Type##_p p, bool flag ) {\+((TYPECASTMETHOD(Type, SetViewChanged, TView))(p))->SetViewChanged(flag);\+}\+\+void Type##_Side ( Type##_p p ) {\+((TYPECASTMETHOD(Type, Side, TView))(p))->Side();\+}\+\+void Type##_SideView ( Type##_p p, TVirtualPad_p pad ) {\+((TYPECASTMETHOD(Type, SideView, TView))(p))->SideView(from_nonconst_to_nonconst<TVirtualPad, TVirtualPad_t>(pad));\+}\+\+void Type##_Top ( Type##_p p ) {\+((TYPECASTMETHOD(Type, Top, TView))(p))->Top();\+}\+\+void Type##_TopView ( Type##_p p, TVirtualPad_p pad ) {\+((TYPECASTMETHOD(Type, TopView, TView))(p))->TopView(from_nonconst_to_nonconst<TVirtualPad, TVirtualPad_t>(pad));\+}+++#define TVIEW_DEF_NONVIRT(Type) \++++#define TVIEW_DEF_ACCESSOR(Type) \++++TOBJECT_DECL_VIRT(TView)+TATTLINE_DECL_VIRT(TView)+DELETABLE_DECL_VIRT(TView)+TVIEW_DECL_VIRT(TView)+TVIEW_DECL_NONVIRT(TView)+TVIEW_DECL_ACCESSOR(TView)++#ifdef __cplusplus+}+#endif+
+ csrc/HROOTGrafTView3D.cpp view
@@ -0,0 +1,26 @@++#include "MacroPatternMatch.h"++#include "HROOTGrafTView.h"++#include "TView3D.h"++#include "HROOTGrafTView3D.h"++using namespace ROOT;++#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)++#define TYPECASTMETHOD(cname,mname,oname) \+  FXIIF( CHECKPROTECT(cname,mname) ) ( \+  (from_nonconst_to_nonconst<oname,cname ## _t>), \+  (from_nonconst_to_nonconst<cname,cname ## _t>) )++TVIEW_DEF_VIRT(TView3D)+TOBJECT_DEF_VIRT(TView3D)+TATTLINE_DEF_VIRT(TView3D)+DELETABLE_DEF_VIRT(TView3D)+TVIEW3D_DEF_VIRT(TView3D)+TVIEW3D_DEF_NONVIRT(TView3D)+TVIEW3D_DEF_ACCESSOR(TView3D)+
+ csrc/HROOTGrafTView3D.h view
@@ -0,0 +1,55 @@++#ifdef __cplusplus+extern "C" {+#endif++#pragma once+++#include "HROOT-grafType.h"++#include "HROOTGrafTView.h"++#include "HROOTCoreTObject.h"++#include "HROOTCoreTAttLine.h"++#include "STDDeletable.h"+++#define TVIEW3D_DECL_VIRT(Type) \++++#define TVIEW3D_DECL_NONVIRT(Type) \++++#define TVIEW3D_DECL_ACCESSOR(Type) \++++#define TVIEW3D_DEF_VIRT(Type) \++++#define TVIEW3D_DEF_NONVIRT(Type) \++++#define TVIEW3D_DEF_ACCESSOR(Type) \++++TVIEW_DECL_VIRT(TView3D)+TOBJECT_DECL_VIRT(TView3D)+TATTLINE_DECL_VIRT(TView3D)+DELETABLE_DECL_VIRT(TView3D)+TVIEW3D_DECL_VIRT(TView3D)+TVIEW3D_DECL_NONVIRT(TView3D)+TVIEW3D_DECL_ACCESSOR(TView3D)++#ifdef __cplusplus+}+#endif+
src/HROOT/Graf.hs view
@@ -1,26 +1,23 @@-module HROOT.Graf (-  module HROOT.Graf.TArc-, module HROOT.Graf.TArrow-, module HROOT.Graf.TAttImage-, module HROOT.Graf.TBRIK-, module HROOT.Graf.TCanvas-, module HROOT.Graf.TCrown-, module HROOT.Graf.TCutG-, module HROOT.Graf.TEllipse-, module HROOT.Graf.TGaxis-, module HROOT.Graf.TGraphPolar-, module HROOT.Graf.TGraphQQ-, module HROOT.Graf.TLine-, module HROOT.Graf.TPad-, module HROOT.Graf.TPCON-, module HROOT.Graf.TShape-, module HROOT.Graf.TSPHE-, module HROOT.Graf.TTUBE-) where-+{-# LANGUAGE FlexibleContexts, FlexibleInstances,+  ForeignFunctionInterface, InterruptibleFFI #-}+module HROOT.Graf+       (module HROOT.Graf.TArc, module HROOT.Graf.TArrow,+        module HROOT.Graf.TAttImage, module HROOT.Graf.TBox,+        module HROOT.Graf.TBRIK, module HROOT.Graf.TCanvas,+        module HROOT.Graf.TCrown, module HROOT.Graf.TCutG,+        module HROOT.Graf.TEllipse, module HROOT.Graf.TGaxis,+        module HROOT.Graf.TGraphPolar, module HROOT.Graf.TGraphQQ,+        module HROOT.Graf.TLine, module HROOT.Graf.TMarker,+        module HROOT.Graf.TPad, module HROOT.Graf.TPCON,+        module HROOT.Graf.TShape, module HROOT.Graf.TSPHE,+        module HROOT.Graf.TTUBE, module HROOT.Graf.TView,+        module HROOT.Graf.TView3D, module HROOT.Graf.Ordinary,+        module HROOT.Graf.Template, module HROOT.Graf.TH)+       where import HROOT.Graf.TArc import HROOT.Graf.TArrow import HROOT.Graf.TAttImage+import HROOT.Graf.TBox import HROOT.Graf.TBRIK import HROOT.Graf.TCanvas import HROOT.Graf.TCrown@@ -30,12 +27,14 @@ import HROOT.Graf.TGraphPolar import HROOT.Graf.TGraphQQ import HROOT.Graf.TLine+import HROOT.Graf.TMarker import HROOT.Graf.TPad import HROOT.Graf.TPCON import HROOT.Graf.TShape import HROOT.Graf.TSPHE import HROOT.Graf.TTUBE----+import HROOT.Graf.TView+import HROOT.Graf.TView3D+import HROOT.Graf.Template+import HROOT.Graf.TH+import HROOT.Graf.Ordinary
+ src/HROOT/Graf/Ordinary.hs view
@@ -0,0 +1,6 @@+{-# LANGUAGE FlexibleContexts, FlexibleInstances,+  ForeignFunctionInterface, InterruptibleFFI #-}+module HROOT.Graf.Ordinary () where+import Foreign.C+import Foreign.Ptr+import FFICXX.Runtime.Cast
src/HROOT/Graf/TArc/Cast.hs view
@@ -8,10 +8,10 @@ import HROOT.Graf.TArc.RawType import HROOT.Graf.TArc.Interface -instance (ITArc a, FPtr a) => Castable a (Ptr RawTArc) where+instance (ITArc a, FPtr a) => Castable (a) (Ptr RawTArc) where         cast x f = f (castPtr (get_fptr x))         uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TArc (Ptr RawTArc) where+instance () => Castable (TArc) (Ptr RawTArc) where         cast x f = f (castPtr (get_fptr x))         uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Graf/TArc/FFI.hsc view
@@ -1,69 +1,89 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Graf.TArc.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Graf.TArc.RawType+import HROOT.Graf.TArc.RawType import HROOT.Core.TObject.RawType import HROOT.Core.TClass.RawType -foreign import ccall safe "HROOTGrafTArc.h TArc_Draw" c_tarc_draw-               :: Ptr RawTArc -> CString -> IO ()+foreign import ccall interruptible "HROOTGrafTArc.h TArc_Clear"+               c_tarc_clear :: Ptr RawTArc -> CString -> IO () -foreign import ccall safe "HROOTGrafTArc.h TArc_FindObject"-               c_tarc_findobject :: Ptr RawTArc -> CString -> IO (Ptr RawTObject)+foreign import ccall interruptible "HROOTGrafTArc.h TArc_Draw"+               c_tarc_draw :: Ptr RawTArc -> CString -> IO () -foreign import ccall safe "HROOTGrafTArc.h TArc_GetName"+foreign import ccall interruptible+               "HROOTGrafTArc.h TArc_FindObject" c_tarc_findobject ::+               Ptr RawTArc -> CString -> IO (Ptr RawTObject)++foreign import ccall interruptible "HROOTGrafTArc.h TArc_GetName"                c_tarc_getname :: Ptr RawTArc -> IO CString -foreign import ccall safe "HROOTGrafTArc.h TArc_IsA" c_tarc_isa ::-               Ptr RawTArc -> IO (Ptr RawTClass)+foreign import ccall interruptible "HROOTGrafTArc.h TArc_IsA"+               c_tarc_isa :: Ptr RawTArc -> IO (Ptr RawTClass) -foreign import ccall safe "HROOTGrafTArc.h TArc_Paint" c_tarc_paint-               :: Ptr RawTArc -> CString -> IO ()+foreign import ccall interruptible "HROOTGrafTArc.h TArc_Paint"+               c_tarc_paint :: Ptr RawTArc -> CString -> IO () -foreign import ccall safe "HROOTGrafTArc.h TArc_printObj"+foreign import ccall interruptible "HROOTGrafTArc.h TArc_printObj"                c_tarc_printobj :: Ptr RawTArc -> CString -> IO () -foreign import ccall safe "HROOTGrafTArc.h TArc_SaveAs"+foreign import ccall interruptible "HROOTGrafTArc.h TArc_SaveAs"                c_tarc_saveas :: Ptr RawTArc -> CString -> CString -> IO () -foreign import ccall safe "HROOTGrafTArc.h TArc_Write" c_tarc_write-               :: Ptr RawTArc -> CString -> CInt -> CInt -> IO CInt+foreign import ccall interruptible "HROOTGrafTArc.h TArc_Write"+               c_tarc_write :: Ptr RawTArc -> CString -> CInt -> CInt -> IO CInt -foreign import ccall safe "HROOTGrafTArc.h TArc_GetLineColor"-               c_tarc_getlinecolor :: Ptr RawTArc -> IO CInt+foreign import ccall interruptible "HROOTGrafTArc.h TArc_Write_"+               c_tarc_write_ :: Ptr RawTArc -> IO CInt -foreign import ccall safe "HROOTGrafTArc.h TArc_GetLineStyle"-               c_tarc_getlinestyle :: Ptr RawTArc -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTArc.h TArc_GetLineColor" c_tarc_getlinecolor ::+               Ptr RawTArc -> IO CShort -foreign import ccall safe "HROOTGrafTArc.h TArc_GetLineWidth"-               c_tarc_getlinewidth :: Ptr RawTArc -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTArc.h TArc_GetLineStyle" c_tarc_getlinestyle ::+               Ptr RawTArc -> IO CShort -foreign import ccall safe "HROOTGrafTArc.h TArc_ResetAttLine"-               c_tarc_resetattline :: Ptr RawTArc -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTArc.h TArc_GetLineWidth" c_tarc_getlinewidth ::+               Ptr RawTArc -> IO CShort -foreign import ccall safe "HROOTGrafTArc.h TArc_SetLineAttributes"-               c_tarc_setlineattributes :: Ptr RawTArc -> IO ()+foreign import ccall interruptible+               "HROOTGrafTArc.h TArc_ResetAttLine" c_tarc_resetattline ::+               Ptr RawTArc -> CString -> IO () -foreign import ccall safe "HROOTGrafTArc.h TArc_SetLineColor"-               c_tarc_setlinecolor :: Ptr RawTArc -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTArc.h TArc_SetLineAttributes" c_tarc_setlineattributes+               :: Ptr RawTArc -> IO () -foreign import ccall safe "HROOTGrafTArc.h TArc_SetLineStyle"-               c_tarc_setlinestyle :: Ptr RawTArc -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTArc.h TArc_SetLineColor" c_tarc_setlinecolor ::+               Ptr RawTArc -> CShort -> IO () -foreign import ccall safe "HROOTGrafTArc.h TArc_SetLineWidth"-               c_tarc_setlinewidth :: Ptr RawTArc -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTArc.h TArc_SetLineStyle" c_tarc_setlinestyle ::+               Ptr RawTArc -> CShort -> IO () -foreign import ccall safe "HROOTGrafTArc.h TArc_SetFillColor"-               c_tarc_setfillcolor :: Ptr RawTArc -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTArc.h TArc_SetLineWidth" c_tarc_setlinewidth ::+               Ptr RawTArc -> CShort -> IO () -foreign import ccall safe "HROOTGrafTArc.h TArc_SetFillStyle"-               c_tarc_setfillstyle :: Ptr RawTArc -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTArc.h TArc_SetFillColor" c_tarc_setfillcolor ::+               Ptr RawTArc -> CInt -> IO () -foreign import ccall safe "HROOTGrafTArc.h TArc_delete"+foreign import ccall interruptible+               "HROOTGrafTArc.h TArc_SetFillStyle" c_tarc_setfillstyle ::+               Ptr RawTArc -> CInt -> IO ()++foreign import ccall interruptible "HROOTGrafTArc.h TArc_delete"                c_tarc_delete :: Ptr RawTArc -> IO () -foreign import ccall safe "HROOTGrafTArc.h TArc_newTArc"+foreign import ccall interruptible "HROOTGrafTArc.h TArc_newTArc"                c_tarc_newtarc ::                CDouble ->                  CDouble -> CDouble -> CDouble -> CDouble -> IO (Ptr RawTArc)
src/HROOT/Graf/TArc/Implementation.hs view
@@ -1,17 +1,26 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances,   ForeignFunctionInterface, IncoherentInstances,-  MultiParamTypeClasses, OverlappingInstances, TypeFamilies,-  TypeSynonymInstances #-}+  MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+  TypeFamilies, TypeSynonymInstances #-} module HROOT.Graf.TArc.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Graf.TArc.RawType import HROOT.Graf.TArc.FFI import HROOT.Graf.TArc.Interface import HROOT.Graf.TArc.Cast+import HROOT.Graf.TArc.RawType+import HROOT.Graf.TArc.Cast+import HROOT.Graf.TArc.Interface import HROOT.Core.TClass.RawType import HROOT.Core.TClass.Cast import HROOT.Core.TClass.Interface@@ -27,15 +36,16 @@ import HROOT.Core.TAttFill.RawType import HROOT.Core.TAttFill.Cast import HROOT.Core.TAttFill.Interface-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Cast-import HROOT.Core.Deletable.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITArc TArc+instance () => ITArc (TArc) where -instance ITEllipse TArc+instance () => ITEllipse (TArc) where -instance ITObject TArc where+instance () => ITObject (TArc) where+        clear = xform1 c_tarc_clear         draw = xform1 c_tarc_draw         findObject = xform1 c_tarc_findobject         getName = xform0 c_tarc_getname@@ -44,8 +54,9 @@         printObj = xform1 c_tarc_printobj         saveAs = xform2 c_tarc_saveas         write = xform3 c_tarc_write+        write_ = xform0 c_tarc_write_ -instance ITAttLine TArc where+instance () => ITAttLine (TArc) where         getLineColor = xform0 c_tarc_getlinecolor         getLineStyle = xform0 c_tarc_getlinestyle         getLineWidth = xform0 c_tarc_getlinewidth@@ -55,13 +66,14 @@         setLineStyle = xform1 c_tarc_setlinestyle         setLineWidth = xform1 c_tarc_setlinewidth -instance ITAttFill TArc where+instance () => ITAttFill (TArc) where         setFillColor = xform1 c_tarc_setfillcolor         setFillStyle = xform1 c_tarc_setfillstyle -instance IDeletable TArc where+instance () => IDeletable (TArc) where         delete = xform0 c_tarc_delete  newTArc ::+          () =>           CDouble -> CDouble -> CDouble -> CDouble -> CDouble -> IO TArc newTArc = xform4 c_tarc_newtarc
src/HROOT/Graf/TArc/Interface.hs view
@@ -4,13 +4,14 @@   TypeSynonymInstances #-} module HROOT.Graf.TArc.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Graf.TArc.RawType import HROOT.Graf.TEllipse.Interface -class ITEllipse a => ITArc a+class (ITEllipse a) => ITArc a where  upcastTArc :: forall a . (FPtr a, ITArc a) => a -> TArc upcastTArc h
src/HROOT/Graf/TArc/RawType.hs view
@@ -8,9 +8,9 @@ data RawTArc  newtype TArc = TArc (Ptr RawTArc)-             deriving (Eq, Ord, Show)+                 deriving (Eq, Ord, Show) -instance FPtr TArc where+instance () => FPtr (TArc) where         type Raw TArc = RawTArc         get_fptr (TArc ptr) = ptr         cast_fptr_to_obj = TArc
src/HROOT/Graf/TArrow/Cast.hs view
@@ -8,10 +8,10 @@ import HROOT.Graf.TArrow.RawType import HROOT.Graf.TArrow.Interface -instance (ITArrow a, FPtr a) => Castable a (Ptr RawTArrow) where+instance (ITArrow a, FPtr a) => Castable (a) (Ptr RawTArrow) where         cast x f = f (castPtr (get_fptr x))         uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TArrow (Ptr RawTArrow) where+instance () => Castable (TArrow) (Ptr RawTArrow) where         cast x f = f (castPtr (get_fptr x))         uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Graf/TArrow/FFI.hsc view
@@ -1,104 +1,127 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Graf.TArrow.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Graf.TArrow.RawType+import HROOT.Graf.TArrow.RawType import HROOT.Graf.TLine.RawType import HROOT.Core.TObject.RawType import HROOT.Core.TClass.RawType -foreign import ccall safe "HROOTGrafTArrow.h TArrow_DrawLine"-               c_tarrow_drawline ::+foreign import ccall interruptible+               "HROOTGrafTArrow.h TArrow_DrawLine" c_tarrow_drawline ::                Ptr RawTArrow ->                  CDouble -> CDouble -> CDouble -> CDouble -> IO (Ptr RawTLine) -foreign import ccall safe "HROOTGrafTArrow.h TArrow_DrawLineNDC"-               c_tarrow_drawlinendc ::+foreign import ccall interruptible+               "HROOTGrafTArrow.h TArrow_DrawLineNDC" c_tarrow_drawlinendc ::                Ptr RawTArrow ->                  CDouble -> CDouble -> CDouble -> CDouble -> IO (Ptr RawTLine) -foreign import ccall safe "HROOTGrafTArrow.h TArrow_PaintLine"-               c_tarrow_paintline ::+foreign import ccall interruptible+               "HROOTGrafTArrow.h TArrow_PaintLine" c_tarrow_paintline ::                Ptr RawTArrow -> CDouble -> CDouble -> CDouble -> CDouble -> IO () -foreign import ccall safe "HROOTGrafTArrow.h TArrow_PaintLineNDC"-               c_tarrow_paintlinendc ::+foreign import ccall interruptible+               "HROOTGrafTArrow.h TArrow_PaintLineNDC" c_tarrow_paintlinendc ::                Ptr RawTArrow -> CDouble -> CDouble -> CDouble -> CDouble -> IO () -foreign import ccall safe "HROOTGrafTArrow.h TArrow_SetX1"+foreign import ccall interruptible "HROOTGrafTArrow.h TArrow_SetX1"                c_tarrow_setx1 :: Ptr RawTArrow -> CDouble -> IO () -foreign import ccall safe "HROOTGrafTArrow.h TArrow_SetX2"+foreign import ccall interruptible "HROOTGrafTArrow.h TArrow_SetX2"                c_tarrow_setx2 :: Ptr RawTArrow -> CDouble -> IO () -foreign import ccall safe "HROOTGrafTArrow.h TArrow_SetY1"+foreign import ccall interruptible "HROOTGrafTArrow.h TArrow_SetY1"                c_tarrow_sety1 :: Ptr RawTArrow -> CDouble -> IO () -foreign import ccall safe "HROOTGrafTArrow.h TArrow_SetY2"+foreign import ccall interruptible "HROOTGrafTArrow.h TArrow_SetY2"                c_tarrow_sety2 :: Ptr RawTArrow -> CDouble -> IO () -foreign import ccall safe "HROOTGrafTArrow.h TArrow_SetFillColor"-               c_tarrow_setfillcolor :: Ptr RawTArrow -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTArrow.h TArrow_SetFillColor" c_tarrow_setfillcolor ::+               Ptr RawTArrow -> CInt -> IO () -foreign import ccall safe "HROOTGrafTArrow.h TArrow_SetFillStyle"-               c_tarrow_setfillstyle :: Ptr RawTArrow -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTArrow.h TArrow_SetFillStyle" c_tarrow_setfillstyle ::+               Ptr RawTArrow -> CInt -> IO () -foreign import ccall safe "HROOTGrafTArrow.h TArrow_Draw"+foreign import ccall interruptible "HROOTGrafTArrow.h TArrow_Clear"+               c_tarrow_clear :: Ptr RawTArrow -> CString -> IO ()++foreign import ccall interruptible "HROOTGrafTArrow.h TArrow_Draw"                c_tarrow_draw :: Ptr RawTArrow -> CString -> IO () -foreign import ccall safe "HROOTGrafTArrow.h TArrow_FindObject"-               c_tarrow_findobject ::+foreign import ccall interruptible+               "HROOTGrafTArrow.h TArrow_FindObject" c_tarrow_findobject ::                Ptr RawTArrow -> CString -> IO (Ptr RawTObject) -foreign import ccall safe "HROOTGrafTArrow.h TArrow_GetName"-               c_tarrow_getname :: Ptr RawTArrow -> IO CString+foreign import ccall interruptible+               "HROOTGrafTArrow.h TArrow_GetName" c_tarrow_getname ::+               Ptr RawTArrow -> IO CString -foreign import ccall safe "HROOTGrafTArrow.h TArrow_IsA"+foreign import ccall interruptible "HROOTGrafTArrow.h TArrow_IsA"                c_tarrow_isa :: Ptr RawTArrow -> IO (Ptr RawTClass) -foreign import ccall safe "HROOTGrafTArrow.h TArrow_Paint"+foreign import ccall interruptible "HROOTGrafTArrow.h TArrow_Paint"                c_tarrow_paint :: Ptr RawTArrow -> CString -> IO () -foreign import ccall safe "HROOTGrafTArrow.h TArrow_printObj"-               c_tarrow_printobj :: Ptr RawTArrow -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTArrow.h TArrow_printObj" c_tarrow_printobj ::+               Ptr RawTArrow -> CString -> IO () -foreign import ccall safe "HROOTGrafTArrow.h TArrow_SaveAs"-               c_tarrow_saveas :: Ptr RawTArrow -> CString -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTArrow.h TArrow_SaveAs" c_tarrow_saveas ::+               Ptr RawTArrow -> CString -> CString -> IO () -foreign import ccall safe "HROOTGrafTArrow.h TArrow_Write"+foreign import ccall interruptible "HROOTGrafTArrow.h TArrow_Write"                c_tarrow_write ::                Ptr RawTArrow -> CString -> CInt -> CInt -> IO CInt -foreign import ccall safe "HROOTGrafTArrow.h TArrow_GetLineColor"-               c_tarrow_getlinecolor :: Ptr RawTArrow -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTArrow.h TArrow_Write_" c_tarrow_write_ ::+               Ptr RawTArrow -> IO CInt -foreign import ccall safe "HROOTGrafTArrow.h TArrow_GetLineStyle"-               c_tarrow_getlinestyle :: Ptr RawTArrow -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTArrow.h TArrow_GetLineColor" c_tarrow_getlinecolor ::+               Ptr RawTArrow -> IO CShort -foreign import ccall safe "HROOTGrafTArrow.h TArrow_GetLineWidth"-               c_tarrow_getlinewidth :: Ptr RawTArrow -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTArrow.h TArrow_GetLineStyle" c_tarrow_getlinestyle ::+               Ptr RawTArrow -> IO CShort -foreign import ccall safe "HROOTGrafTArrow.h TArrow_ResetAttLine"-               c_tarrow_resetattline :: Ptr RawTArrow -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTArrow.h TArrow_GetLineWidth" c_tarrow_getlinewidth ::+               Ptr RawTArrow -> IO CShort -foreign import ccall safe+foreign import ccall interruptible+               "HROOTGrafTArrow.h TArrow_ResetAttLine" c_tarrow_resetattline ::+               Ptr RawTArrow -> CString -> IO ()++foreign import ccall interruptible                "HROOTGrafTArrow.h TArrow_SetLineAttributes"                c_tarrow_setlineattributes :: Ptr RawTArrow -> IO () -foreign import ccall safe "HROOTGrafTArrow.h TArrow_SetLineColor"-               c_tarrow_setlinecolor :: Ptr RawTArrow -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTArrow.h TArrow_SetLineColor" c_tarrow_setlinecolor ::+               Ptr RawTArrow -> CShort -> IO () -foreign import ccall safe "HROOTGrafTArrow.h TArrow_SetLineStyle"-               c_tarrow_setlinestyle :: Ptr RawTArrow -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTArrow.h TArrow_SetLineStyle" c_tarrow_setlinestyle ::+               Ptr RawTArrow -> CShort -> IO () -foreign import ccall safe "HROOTGrafTArrow.h TArrow_SetLineWidth"-               c_tarrow_setlinewidth :: Ptr RawTArrow -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTArrow.h TArrow_SetLineWidth" c_tarrow_setlinewidth ::+               Ptr RawTArrow -> CShort -> IO () -foreign import ccall safe "HROOTGrafTArrow.h TArrow_delete"-               c_tarrow_delete :: Ptr RawTArrow -> IO ()+foreign import ccall interruptible+               "HROOTGrafTArrow.h TArrow_delete" c_tarrow_delete ::+               Ptr RawTArrow -> IO () -foreign import ccall safe "HROOTGrafTArrow.h TArrow_newTArrow"-               c_tarrow_newtarrow ::+foreign import ccall interruptible+               "HROOTGrafTArrow.h TArrow_newTArrow" c_tarrow_newtarrow ::                CDouble ->                  CDouble ->-                   CDouble -> CDouble -> CDouble -> CString -> IO (Ptr RawTArrow)+                   CDouble -> CDouble -> CFloat -> CString -> IO (Ptr RawTArrow)
src/HROOT/Graf/TArrow/Implementation.hs view
@@ -1,17 +1,26 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances,   ForeignFunctionInterface, IncoherentInstances,-  MultiParamTypeClasses, OverlappingInstances, TypeFamilies,-  TypeSynonymInstances #-}+  MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+  TypeFamilies, TypeSynonymInstances #-} module HROOT.Graf.TArrow.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Graf.TArrow.RawType import HROOT.Graf.TArrow.FFI import HROOT.Graf.TArrow.Interface import HROOT.Graf.TArrow.Cast+import HROOT.Graf.TArrow.RawType+import HROOT.Graf.TArrow.Cast+import HROOT.Graf.TArrow.Interface import HROOT.Core.TClass.RawType import HROOT.Core.TClass.Cast import HROOT.Core.TClass.Interface@@ -27,13 +36,13 @@ import HROOT.Core.TAttLine.RawType import HROOT.Core.TAttLine.Cast import HROOT.Core.TAttLine.Interface-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Cast-import HROOT.Core.Deletable.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITArrow TArrow+instance () => ITArrow (TArrow) where -instance ITLine TArrow where+instance () => ITLine (TArrow) where         drawLine = xform4 c_tarrow_drawline         drawLineNDC = xform4 c_tarrow_drawlinendc         paintLine = xform4 c_tarrow_paintline@@ -43,11 +52,12 @@         setY1 = xform1 c_tarrow_sety1         setY2 = xform1 c_tarrow_sety2 -instance ITAttFill TArrow where+instance () => ITAttFill (TArrow) where         setFillColor = xform1 c_tarrow_setfillcolor         setFillStyle = xform1 c_tarrow_setfillstyle -instance ITObject TArrow where+instance () => ITObject (TArrow) where+        clear = xform1 c_tarrow_clear         draw = xform1 c_tarrow_draw         findObject = xform1 c_tarrow_findobject         getName = xform0 c_tarrow_getname@@ -56,8 +66,9 @@         printObj = xform1 c_tarrow_printobj         saveAs = xform2 c_tarrow_saveas         write = xform3 c_tarrow_write+        write_ = xform0 c_tarrow_write_ -instance ITAttLine TArrow where+instance () => ITAttLine (TArrow) where         getLineColor = xform0 c_tarrow_getlinecolor         getLineStyle = xform0 c_tarrow_getlinestyle         getLineWidth = xform0 c_tarrow_getlinewidth@@ -67,11 +78,11 @@         setLineStyle = xform1 c_tarrow_setlinestyle         setLineWidth = xform1 c_tarrow_setlinewidth -instance IDeletable TArrow where+instance () => IDeletable (TArrow) where         delete = xform0 c_tarrow_delete  newTArrow ::-            Castable c0 CString =>+            (Castable c0 CString) =>             CDouble ->-              CDouble -> CDouble -> CDouble -> CDouble -> c0 -> IO TArrow+              CDouble -> CDouble -> CDouble -> CFloat -> c0 -> IO TArrow newTArrow = xform5 c_tarrow_newtarrow
src/HROOT/Graf/TArrow/Interface.hs view
@@ -4,6 +4,7 @@   TypeSynonymInstances #-} module HROOT.Graf.TArrow.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast@@ -11,7 +12,7 @@ import HROOT.Graf.TLine.Interface import HROOT.Core.TAttFill.Interface -class (ITLine a, ITAttFill a) => ITArrow a+class (ITLine a, ITAttFill a) => ITArrow a where  upcastTArrow :: forall a . (FPtr a, ITArrow a) => a -> TArrow upcastTArrow h
src/HROOT/Graf/TArrow/RawType.hs view
@@ -8,9 +8,9 @@ data RawTArrow  newtype TArrow = TArrow (Ptr RawTArrow)-               deriving (Eq, Ord, Show)+                   deriving (Eq, Ord, Show) -instance FPtr TArrow where+instance () => FPtr (TArrow) where         type Raw TArrow = RawTArrow         get_fptr (TArrow ptr) = ptr         cast_fptr_to_obj = TArrow
src/HROOT/Graf/TAttImage/Cast.hs view
@@ -8,11 +8,11 @@ import HROOT.Graf.TAttImage.RawType import HROOT.Graf.TAttImage.Interface -instance (ITAttImage a, FPtr a) => Castable a (Ptr RawTAttImage)+instance (ITAttImage a, FPtr a) => Castable (a) (Ptr RawTAttImage)          where         cast x f = f (castPtr (get_fptr x))         uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TAttImage (Ptr RawTAttImage) where+instance () => Castable (TAttImage) (Ptr RawTAttImage) where         cast x f = f (castPtr (get_fptr x))         uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Graf/TAttImage/FFI.hsc view
@@ -1,8 +1,12 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Graf.TAttImage.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Graf.TAttImage.RawType+import HROOT.Graf.TAttImage.RawType -foreign import ccall safe "HROOTGrafTAttImage.h TAttImage_delete"-               c_tattimage_delete :: Ptr RawTAttImage -> IO ()+foreign import ccall interruptible+               "HROOTGrafTAttImage.h TAttImage_delete" c_tattimage_delete ::+               Ptr RawTAttImage -> IO ()
src/HROOT/Graf/TAttImage/Implementation.hs view
@@ -1,22 +1,31 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances,   ForeignFunctionInterface, IncoherentInstances,-  MultiParamTypeClasses, OverlappingInstances, TypeFamilies,-  TypeSynonymInstances #-}+  MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+  TypeFamilies, TypeSynonymInstances #-} module HROOT.Graf.TAttImage.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Graf.TAttImage.RawType import HROOT.Graf.TAttImage.FFI import HROOT.Graf.TAttImage.Interface import HROOT.Graf.TAttImage.Cast-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Cast-import HROOT.Core.Deletable.Interface+import HROOT.Graf.TAttImage.RawType+import HROOT.Graf.TAttImage.Cast+import HROOT.Graf.TAttImage.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITAttImage TAttImage+instance () => ITAttImage (TAttImage) where -instance IDeletable TAttImage where+instance () => IDeletable (TAttImage) where         delete = xform0 c_tattimage_delete
src/HROOT/Graf/TAttImage/Interface.hs view
@@ -4,13 +4,14 @@   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 HROOT.Core.Deletable.Interface+import STD.Deletable.Interface -class IDeletable a => ITAttImage a+class (IDeletable a) => ITAttImage a where  upcastTAttImage ::                 forall a . (FPtr a, ITAttImage a) => a -> TAttImage
src/HROOT/Graf/TAttImage/RawType.hs view
@@ -8,9 +8,9 @@ data RawTAttImage  newtype TAttImage = TAttImage (Ptr RawTAttImage)-                  deriving (Eq, Ord, Show)+                      deriving (Eq, Ord, Show) -instance FPtr TAttImage where+instance () => FPtr (TAttImage) where         type Raw TAttImage = RawTAttImage         get_fptr (TAttImage ptr) = ptr         cast_fptr_to_obj = TAttImage
src/HROOT/Graf/TBRIK/Cast.hs view
@@ -8,10 +8,10 @@ import HROOT.Graf.TBRIK.RawType import HROOT.Graf.TBRIK.Interface -instance (ITBRIK a, FPtr a) => Castable a (Ptr RawTBRIK) where+instance (ITBRIK a, FPtr a) => Castable (a) (Ptr RawTBRIK) where         cast x f = f (castPtr (get_fptr x))         uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TBRIK (Ptr RawTBRIK) where+instance () => Castable (TBRIK) (Ptr RawTBRIK) where         cast x f = f (castPtr (get_fptr x))         uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Graf/TBRIK/FFI.hsc view
@@ -1,81 +1,102 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Graf.TBRIK.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Graf.TBRIK.RawType+import HROOT.Graf.TBRIK.RawType import HROOT.Core.TObject.RawType import HROOT.Core.TClass.RawType -foreign import ccall safe "HROOTGrafTBRIK.h TBRIK_SetName"+foreign import ccall interruptible "HROOTGrafTBRIK.h TBRIK_SetName"                c_tbrik_setname :: Ptr RawTBRIK -> CString -> IO () -foreign import ccall safe "HROOTGrafTBRIK.h TBRIK_SetNameTitle"-               c_tbrik_setnametitle :: Ptr RawTBRIK -> CString -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTBRIK.h TBRIK_SetNameTitle" c_tbrik_setnametitle ::+               Ptr RawTBRIK -> CString -> CString -> IO () -foreign import ccall safe "HROOTGrafTBRIK.h TBRIK_SetTitle"-               c_tbrik_settitle :: Ptr RawTBRIK -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTBRIK.h TBRIK_SetTitle" c_tbrik_settitle ::+               Ptr RawTBRIK -> CString -> IO () -foreign import ccall safe "HROOTGrafTBRIK.h TBRIK_GetLineColor"-               c_tbrik_getlinecolor :: Ptr RawTBRIK -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTBRIK.h TBRIK_GetLineColor" c_tbrik_getlinecolor ::+               Ptr RawTBRIK -> IO CShort -foreign import ccall safe "HROOTGrafTBRIK.h TBRIK_GetLineStyle"-               c_tbrik_getlinestyle :: Ptr RawTBRIK -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTBRIK.h TBRIK_GetLineStyle" c_tbrik_getlinestyle ::+               Ptr RawTBRIK -> IO CShort -foreign import ccall safe "HROOTGrafTBRIK.h TBRIK_GetLineWidth"-               c_tbrik_getlinewidth :: Ptr RawTBRIK -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTBRIK.h TBRIK_GetLineWidth" c_tbrik_getlinewidth ::+               Ptr RawTBRIK -> IO CShort -foreign import ccall safe "HROOTGrafTBRIK.h TBRIK_ResetAttLine"-               c_tbrik_resetattline :: Ptr RawTBRIK -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTBRIK.h TBRIK_ResetAttLine" c_tbrik_resetattline ::+               Ptr RawTBRIK -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTBRIK.h TBRIK_SetLineAttributes"                c_tbrik_setlineattributes :: Ptr RawTBRIK -> IO () -foreign import ccall safe "HROOTGrafTBRIK.h TBRIK_SetLineColor"-               c_tbrik_setlinecolor :: Ptr RawTBRIK -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTBRIK.h TBRIK_SetLineColor" c_tbrik_setlinecolor ::+               Ptr RawTBRIK -> CShort -> IO () -foreign import ccall safe "HROOTGrafTBRIK.h TBRIK_SetLineStyle"-               c_tbrik_setlinestyle :: Ptr RawTBRIK -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTBRIK.h TBRIK_SetLineStyle" c_tbrik_setlinestyle ::+               Ptr RawTBRIK -> CShort -> IO () -foreign import ccall safe "HROOTGrafTBRIK.h TBRIK_SetLineWidth"-               c_tbrik_setlinewidth :: Ptr RawTBRIK -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTBRIK.h TBRIK_SetLineWidth" c_tbrik_setlinewidth ::+               Ptr RawTBRIK -> CShort -> IO () -foreign import ccall safe "HROOTGrafTBRIK.h TBRIK_SetFillColor"-               c_tbrik_setfillcolor :: Ptr RawTBRIK -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTBRIK.h TBRIK_SetFillColor" c_tbrik_setfillcolor ::+               Ptr RawTBRIK -> CInt -> IO () -foreign import ccall safe "HROOTGrafTBRIK.h TBRIK_SetFillStyle"-               c_tbrik_setfillstyle :: Ptr RawTBRIK -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTBRIK.h TBRIK_SetFillStyle" c_tbrik_setfillstyle ::+               Ptr RawTBRIK -> CInt -> IO () -foreign import ccall safe "HROOTGrafTBRIK.h TBRIK_Draw"+foreign import ccall interruptible "HROOTGrafTBRIK.h TBRIK_Clear"+               c_tbrik_clear :: Ptr RawTBRIK -> CString -> IO ()++foreign import ccall interruptible "HROOTGrafTBRIK.h TBRIK_Draw"                c_tbrik_draw :: Ptr RawTBRIK -> CString -> IO () -foreign import ccall safe "HROOTGrafTBRIK.h TBRIK_FindObject"-               c_tbrik_findobject ::+foreign import ccall interruptible+               "HROOTGrafTBRIK.h TBRIK_FindObject" c_tbrik_findobject ::                Ptr RawTBRIK -> CString -> IO (Ptr RawTObject) -foreign import ccall safe "HROOTGrafTBRIK.h TBRIK_GetName"+foreign import ccall interruptible "HROOTGrafTBRIK.h TBRIK_GetName"                c_tbrik_getname :: Ptr RawTBRIK -> IO CString -foreign import ccall safe "HROOTGrafTBRIK.h TBRIK_IsA" c_tbrik_isa-               :: Ptr RawTBRIK -> IO (Ptr RawTClass)+foreign import ccall interruptible "HROOTGrafTBRIK.h TBRIK_IsA"+               c_tbrik_isa :: Ptr RawTBRIK -> IO (Ptr RawTClass) -foreign import ccall safe "HROOTGrafTBRIK.h TBRIK_Paint"+foreign import ccall interruptible "HROOTGrafTBRIK.h TBRIK_Paint"                c_tbrik_paint :: Ptr RawTBRIK -> CString -> IO () -foreign import ccall safe "HROOTGrafTBRIK.h TBRIK_printObj"-               c_tbrik_printobj :: Ptr RawTBRIK -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTBRIK.h TBRIK_printObj" c_tbrik_printobj ::+               Ptr RawTBRIK -> CString -> IO () -foreign import ccall safe "HROOTGrafTBRIK.h TBRIK_SaveAs"+foreign import ccall interruptible "HROOTGrafTBRIK.h TBRIK_SaveAs"                c_tbrik_saveas :: Ptr RawTBRIK -> CString -> CString -> IO () -foreign import ccall safe "HROOTGrafTBRIK.h TBRIK_Write"+foreign import ccall interruptible "HROOTGrafTBRIK.h TBRIK_Write"                c_tbrik_write :: Ptr RawTBRIK -> CString -> CInt -> CInt -> IO CInt -foreign import ccall safe "HROOTGrafTBRIK.h TBRIK_delete"+foreign import ccall interruptible "HROOTGrafTBRIK.h TBRIK_Write_"+               c_tbrik_write_ :: Ptr RawTBRIK -> IO CInt++foreign import ccall interruptible "HROOTGrafTBRIK.h TBRIK_delete"                c_tbrik_delete :: Ptr RawTBRIK -> IO () -foreign import ccall safe "HROOTGrafTBRIK.h TBRIK_newTBRIK"-               c_tbrik_newtbrik ::+foreign import ccall interruptible+               "HROOTGrafTBRIK.h TBRIK_newTBRIK" c_tbrik_newtbrik ::                CString ->                  CString ->-                   CString -> CDouble -> CDouble -> CDouble -> IO (Ptr RawTBRIK)+                   CString -> CFloat -> CFloat -> CFloat -> IO (Ptr RawTBRIK)
src/HROOT/Graf/TBRIK/Implementation.hs view
@@ -1,17 +1,26 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances,   ForeignFunctionInterface, IncoherentInstances,-  MultiParamTypeClasses, OverlappingInstances, TypeFamilies,-  TypeSynonymInstances #-}+  MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+  TypeFamilies, TypeSynonymInstances #-} module HROOT.Graf.TBRIK.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Graf.TBRIK.RawType import HROOT.Graf.TBRIK.FFI import HROOT.Graf.TBRIK.Interface import HROOT.Graf.TBRIK.Cast+import HROOT.Graf.TBRIK.RawType+import HROOT.Graf.TBRIK.Cast+import HROOT.Graf.TBRIK.Interface import HROOT.Core.TClass.RawType import HROOT.Core.TClass.Cast import HROOT.Core.TClass.Interface@@ -33,20 +42,20 @@ import HROOT.Core.TObject.RawType import HROOT.Core.TObject.Cast import HROOT.Core.TObject.Interface-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Cast-import HROOT.Core.Deletable.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITBRIK TBRIK+instance () => ITBRIK (TBRIK) where -instance ITShape TBRIK+instance () => ITShape (TBRIK) where -instance ITNamed TBRIK where+instance () => ITNamed (TBRIK) where         setName = xform1 c_tbrik_setname         setNameTitle = xform2 c_tbrik_setnametitle         setTitle = xform1 c_tbrik_settitle -instance ITAttLine TBRIK where+instance () => ITAttLine (TBRIK) where         getLineColor = xform0 c_tbrik_getlinecolor         getLineStyle = xform0 c_tbrik_getlinestyle         getLineWidth = xform0 c_tbrik_getlinewidth@@ -56,13 +65,14 @@         setLineStyle = xform1 c_tbrik_setlinestyle         setLineWidth = xform1 c_tbrik_setlinewidth -instance ITAttFill TBRIK where+instance () => ITAttFill (TBRIK) where         setFillColor = xform1 c_tbrik_setfillcolor         setFillStyle = xform1 c_tbrik_setfillstyle -instance ITAtt3D TBRIK+instance () => ITAtt3D (TBRIK) where -instance ITObject TBRIK where+instance () => ITObject (TBRIK) where+        clear = xform1 c_tbrik_clear         draw = xform1 c_tbrik_draw         findObject = xform1 c_tbrik_findobject         getName = xform0 c_tbrik_getname@@ -71,11 +81,12 @@         printObj = xform1 c_tbrik_printobj         saveAs = xform2 c_tbrik_saveas         write = xform3 c_tbrik_write+        write_ = xform0 c_tbrik_write_ -instance IDeletable TBRIK where+instance () => IDeletable (TBRIK) where         delete = xform0 c_tbrik_delete  newTBRIK ::            (Castable c2 CString, Castable c1 CString, Castable c0 CString) =>-           c0 -> c1 -> c2 -> CDouble -> CDouble -> CDouble -> IO TBRIK+           c0 -> c1 -> c2 -> CFloat -> CFloat -> CFloat -> IO TBRIK newTBRIK = xform5 c_tbrik_newtbrik
src/HROOT/Graf/TBRIK/Interface.hs view
@@ -4,13 +4,14 @@   TypeSynonymInstances #-} module HROOT.Graf.TBRIK.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Graf.TBRIK.RawType import HROOT.Graf.TShape.Interface -class ITShape a => ITBRIK a+class (ITShape a) => ITBRIK a where  upcastTBRIK :: forall a . (FPtr a, ITBRIK a) => a -> TBRIK upcastTBRIK h
src/HROOT/Graf/TBRIK/RawType.hs view
@@ -8,9 +8,9 @@ data RawTBRIK  newtype TBRIK = TBRIK (Ptr RawTBRIK)-              deriving (Eq, Ord, Show)+                  deriving (Eq, Ord, Show) -instance FPtr TBRIK where+instance () => FPtr (TBRIK) where         type Raw TBRIK = RawTBRIK         get_fptr (TBRIK ptr) = ptr         cast_fptr_to_obj = TBRIK
+ src/HROOT/Graf/TBox.hs view
@@ -0,0 +1,5 @@+module HROOT.Graf.TBox+       (TBox(..), ITBox, upcastTBox, downcastTBox, newTBox) where+import HROOT.Graf.TBox.RawType+import HROOT.Graf.TBox.Interface+import HROOT.Graf.TBox.Implementation
+ src/HROOT/Graf/TBox/Cast.hs view
@@ -0,0 +1,17 @@+{-# LANGUAGE FlexibleInstances, FlexibleContexts, TypeFamilies,+  MultiParamTypeClasses, OverlappingInstances, IncoherentInstances+  #-}+module HROOT.Graf.TBox.Cast where+import Foreign.Ptr+import FFICXX.Runtime.Cast+import System.IO.Unsafe+import HROOT.Graf.TBox.RawType+import HROOT.Graf.TBox.Interface++instance (ITBox a, FPtr a) => Castable (a) (Ptr RawTBox) where+        cast x f = f (castPtr (get_fptr x))+        uncast x f = f (cast_fptr_to_obj (castPtr x))++instance () => Castable (TBox) (Ptr RawTBox) where+        cast x f = f (castPtr (get_fptr x))+        uncast x f = f (cast_fptr_to_obj (castPtr x))
+ src/HROOT/Graf/TBox/FFI.hsc view
@@ -0,0 +1,88 @@+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-}+module HROOT.Graf.TBox.FFI where+import Data.Word+import Data.Int+import Foreign.C+import Foreign.Ptr+import HROOT.Graf.TBox.RawType+import HROOT.Graf.TBox.RawType+import HROOT.Core.TObject.RawType+import HROOT.Core.TClass.RawType++foreign import ccall interruptible "HROOTGrafTBox.h TBox_Clear"+               c_tbox_clear :: Ptr RawTBox -> CString -> IO ()++foreign import ccall interruptible "HROOTGrafTBox.h TBox_Draw"+               c_tbox_draw :: Ptr RawTBox -> CString -> IO ()++foreign import ccall interruptible+               "HROOTGrafTBox.h TBox_FindObject" c_tbox_findobject ::+               Ptr RawTBox -> CString -> IO (Ptr RawTObject)++foreign import ccall interruptible "HROOTGrafTBox.h TBox_GetName"+               c_tbox_getname :: Ptr RawTBox -> IO CString++foreign import ccall interruptible "HROOTGrafTBox.h TBox_IsA"+               c_tbox_isa :: Ptr RawTBox -> IO (Ptr RawTClass)++foreign import ccall interruptible "HROOTGrafTBox.h TBox_Paint"+               c_tbox_paint :: Ptr RawTBox -> CString -> IO ()++foreign import ccall interruptible "HROOTGrafTBox.h TBox_printObj"+               c_tbox_printobj :: Ptr RawTBox -> CString -> IO ()++foreign import ccall interruptible "HROOTGrafTBox.h TBox_SaveAs"+               c_tbox_saveas :: Ptr RawTBox -> CString -> CString -> IO ()++foreign import ccall interruptible "HROOTGrafTBox.h TBox_Write"+               c_tbox_write :: Ptr RawTBox -> CString -> CInt -> CInt -> IO CInt++foreign import ccall interruptible "HROOTGrafTBox.h TBox_Write_"+               c_tbox_write_ :: Ptr RawTBox -> IO CInt++foreign import ccall interruptible+               "HROOTGrafTBox.h TBox_GetLineColor" c_tbox_getlinecolor ::+               Ptr RawTBox -> IO CShort++foreign import ccall interruptible+               "HROOTGrafTBox.h TBox_GetLineStyle" c_tbox_getlinestyle ::+               Ptr RawTBox -> IO CShort++foreign import ccall interruptible+               "HROOTGrafTBox.h TBox_GetLineWidth" c_tbox_getlinewidth ::+               Ptr RawTBox -> IO CShort++foreign import ccall interruptible+               "HROOTGrafTBox.h TBox_ResetAttLine" c_tbox_resetattline ::+               Ptr RawTBox -> CString -> IO ()++foreign import ccall interruptible+               "HROOTGrafTBox.h TBox_SetLineAttributes" c_tbox_setlineattributes+               :: Ptr RawTBox -> IO ()++foreign import ccall interruptible+               "HROOTGrafTBox.h TBox_SetLineColor" c_tbox_setlinecolor ::+               Ptr RawTBox -> CShort -> IO ()++foreign import ccall interruptible+               "HROOTGrafTBox.h TBox_SetLineStyle" c_tbox_setlinestyle ::+               Ptr RawTBox -> CShort -> IO ()++foreign import ccall interruptible+               "HROOTGrafTBox.h TBox_SetLineWidth" c_tbox_setlinewidth ::+               Ptr RawTBox -> CShort -> IO ()++foreign import ccall interruptible+               "HROOTGrafTBox.h TBox_SetFillColor" c_tbox_setfillcolor ::+               Ptr RawTBox -> CInt -> IO ()++foreign import ccall interruptible+               "HROOTGrafTBox.h TBox_SetFillStyle" c_tbox_setfillstyle ::+               Ptr RawTBox -> CInt -> IO ()++foreign import ccall interruptible "HROOTGrafTBox.h TBox_delete"+               c_tbox_delete :: Ptr RawTBox -> IO ()++foreign import ccall interruptible "HROOTGrafTBox.h TBox_newTBox"+               c_tbox_newtbox ::+               CDouble -> CDouble -> CDouble -> CDouble -> IO (Ptr RawTBox)
+ src/HROOT/Graf/TBox/Implementation.hs view
@@ -0,0 +1,73 @@+{-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances,+  ForeignFunctionInterface, IncoherentInstances,+  MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+  TypeFamilies, TypeSynonymInstances #-}+module HROOT.Graf.TBox.Implementation where+import Data.Monoid+import Data.Word+import Data.Int+import Foreign.C+import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax+import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH+import HROOT.Graf.TBox.RawType+import HROOT.Graf.TBox.FFI+import HROOT.Graf.TBox.Interface+import HROOT.Graf.TBox.Cast+import HROOT.Graf.TBox.RawType+import HROOT.Graf.TBox.Cast+import HROOT.Graf.TBox.Interface+import HROOT.Core.TClass.RawType+import HROOT.Core.TClass.Cast+import HROOT.Core.TClass.Interface+import HROOT.Core.TObject.RawType+import HROOT.Core.TObject.Cast+import HROOT.Core.TObject.Interface+import HROOT.Core.TAttLine.RawType+import HROOT.Core.TAttLine.Cast+import HROOT.Core.TAttLine.Interface+import HROOT.Core.TAttFill.RawType+import HROOT.Core.TAttFill.Cast+import HROOT.Core.TAttFill.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface++instance () => ITBox (TBox) where++instance () => ITObject (TBox) where+        clear = xform1 c_tbox_clear+        draw = xform1 c_tbox_draw+        findObject = xform1 c_tbox_findobject+        getName = xform0 c_tbox_getname+        isA = xform0 c_tbox_isa+        paint = xform1 c_tbox_paint+        printObj = xform1 c_tbox_printobj+        saveAs = xform2 c_tbox_saveas+        write = xform3 c_tbox_write+        write_ = xform0 c_tbox_write_++instance () => ITAttLine (TBox) where+        getLineColor = xform0 c_tbox_getlinecolor+        getLineStyle = xform0 c_tbox_getlinestyle+        getLineWidth = xform0 c_tbox_getlinewidth+        resetAttLine = xform1 c_tbox_resetattline+        setLineAttributes = xform0 c_tbox_setlineattributes+        setLineColor = xform1 c_tbox_setlinecolor+        setLineStyle = xform1 c_tbox_setlinestyle+        setLineWidth = xform1 c_tbox_setlinewidth++instance () => ITAttFill (TBox) where+        setFillColor = xform1 c_tbox_setfillcolor+        setFillStyle = xform1 c_tbox_setfillstyle++instance () => IDeletable (TBox) where+        delete = xform0 c_tbox_delete++newTBox ::+          () => CDouble -> CDouble -> CDouble -> CDouble -> IO TBox+newTBox = xform3 c_tbox_newtbox
+ src/HROOT/Graf/TBox/Interface.hs view
@@ -0,0 +1,28 @@+{-# LANGUAGE EmptyDataDecls, ExistentialQuantification,+  FlexibleContexts, FlexibleInstances, ForeignFunctionInterface,+  MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies,+  TypeSynonymInstances #-}+module HROOT.Graf.TBox.Interface where+import Data.Word+import Data.Int+import Foreign.C+import Foreign.Ptr+import FFICXX.Runtime.Cast+import HROOT.Graf.TBox.RawType+import HROOT.Core.TObject.Interface+import HROOT.Core.TAttLine.Interface+import HROOT.Core.TAttFill.Interface++class (ITObject a, ITAttLine a, ITAttFill a) => ITBox a where++upcastTBox :: forall a . (FPtr a, ITBox a) => a -> TBox+upcastTBox h+  = let fh = get_fptr h+        fh2 :: Ptr RawTBox = castPtr fh+      in cast_fptr_to_obj fh2++downcastTBox :: forall a . (FPtr a, ITBox a) => TBox -> a+downcastTBox h+  = let fh = get_fptr h+        fh2 = castPtr fh+      in cast_fptr_to_obj fh2
+ src/HROOT/Graf/TBox/RawType.hs view
@@ -0,0 +1,16 @@+{-# LANGUAGE ForeignFunctionInterface, TypeFamilies,+  MultiParamTypeClasses, FlexibleInstances, TypeSynonymInstances,+  EmptyDataDecls, ExistentialQuantification, ScopedTypeVariables #-}+module HROOT.Graf.TBox.RawType where+import Foreign.Ptr+import FFICXX.Runtime.Cast++data RawTBox++newtype TBox = TBox (Ptr RawTBox)+                 deriving (Eq, Ord, Show)++instance () => FPtr (TBox) where+        type Raw TBox = RawTBox+        get_fptr (TBox ptr) = ptr+        cast_fptr_to_obj = TBox
src/HROOT/Graf/TCanvas.hs view
@@ -1,5 +1,6 @@ module HROOT.Graf.TCanvas-       (TCanvas(..), ITCanvas, upcastTCanvas, downcastTCanvas, newTCanvas)+       (TCanvas(..), ITCanvas(..), upcastTCanvas, downcastTCanvas,+        newTCanvas)        where import HROOT.Graf.TCanvas.RawType import HROOT.Graf.TCanvas.Interface
src/HROOT/Graf/TCanvas/Cast.hs view
@@ -8,10 +8,11 @@ import HROOT.Graf.TCanvas.RawType import HROOT.Graf.TCanvas.Interface -instance (ITCanvas a, FPtr a) => Castable a (Ptr RawTCanvas) where+instance (ITCanvas a, FPtr a) => Castable (a) (Ptr RawTCanvas)+         where         cast x f = f (castPtr (get_fptr x))         uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TCanvas (Ptr RawTCanvas) where+instance () => Castable (TCanvas) (Ptr RawTCanvas) where         cast x f = f (castPtr (get_fptr x))         uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Graf/TCanvas/FFI.hsc view
@@ -1,58 +1,213 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Graf.TCanvas.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Graf.TCanvas.RawType+import HROOT.Graf.TCanvas.RawType+import HROOT.Hist.TH1F.RawType+import HROOT.Graf.TView.RawType import HROOT.Core.TObject.RawType import HROOT.Core.TClass.RawType -foreign import ccall safe "HROOTGrafTCanvas.h TCanvas_cd"+foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_DrawFrame" c_tcanvas_drawframe ::+               Ptr RawTCanvas ->+                 CDouble ->+                   CDouble -> CDouble -> CDouble -> CString -> IO (Ptr RawTH1F)++foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_GetView" c_tcanvas_getview ::+               Ptr RawTCanvas -> IO (Ptr RawTView)++foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_SetView0" c_tcanvas_setview0 ::+               Ptr RawTCanvas -> IO ()++foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_SetView" c_tcanvas_setview ::+               Ptr RawTCanvas -> Ptr RawTView -> IO ()++foreign import ccall interruptible "HROOTGrafTCanvas.h TCanvas_cd"                c_tcanvas_cd :: Ptr RawTCanvas -> CInt -> IO (Ptr RawTCanvas) -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTCanvas.h TCanvas_divide_tvirtualpad"                c_tcanvas_divide_tvirtualpad ::-               Ptr RawTCanvas ->-                 CInt -> CInt -> CDouble -> CDouble -> CInt -> IO ()+               Ptr RawTCanvas -> CInt -> CInt -> CFloat -> CFloat -> CInt -> IO () -foreign import ccall safe "HROOTGrafTCanvas.h TCanvas_SetLogx"-               c_tcanvas_setlogx :: Ptr RawTCanvas -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_Modified" c_tcanvas_modified ::+               Ptr RawTCanvas -> CBool -> IO () -foreign import ccall safe "HROOTGrafTCanvas.h TCanvas_SetLogy"-               c_tcanvas_setlogy :: Ptr RawTCanvas -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_Range" c_tcanvas_range ::+               Ptr RawTCanvas -> CDouble -> CDouble -> CDouble -> CDouble -> IO () -foreign import ccall safe "HROOTGrafTCanvas.h TCanvas_SetLogz"-               c_tcanvas_setlogz :: Ptr RawTCanvas -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_SetLogx" c_tcanvas_setlogx ::+               Ptr RawTCanvas -> CInt -> IO () -foreign import ccall safe "HROOTGrafTCanvas.h TCanvas_Draw"-               c_tcanvas_draw :: Ptr RawTCanvas -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_SetLogy" c_tcanvas_setlogy ::+               Ptr RawTCanvas -> CInt -> IO () -foreign import ccall safe "HROOTGrafTCanvas.h TCanvas_FindObject"-               c_tcanvas_findobject ::+foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_SetLogz" c_tcanvas_setlogz ::+               Ptr RawTCanvas -> CInt -> IO ()++foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_Update" c_tcanvas_update ::+               Ptr RawTCanvas -> IO ()++foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_Clear" c_tcanvas_clear ::+               Ptr RawTCanvas -> CString -> IO ()++foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_Draw" c_tcanvas_draw ::+               Ptr RawTCanvas -> CString -> IO ()++foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_FindObject" c_tcanvas_findobject ::                Ptr RawTCanvas -> CString -> IO (Ptr RawTObject) -foreign import ccall safe "HROOTGrafTCanvas.h TCanvas_GetName"-               c_tcanvas_getname :: Ptr RawTCanvas -> IO CString+foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_GetName" c_tcanvas_getname ::+               Ptr RawTCanvas -> IO CString -foreign import ccall safe "HROOTGrafTCanvas.h TCanvas_IsA"+foreign import ccall interruptible "HROOTGrafTCanvas.h TCanvas_IsA"                c_tcanvas_isa :: Ptr RawTCanvas -> IO (Ptr RawTClass) -foreign import ccall safe "HROOTGrafTCanvas.h TCanvas_Paint"-               c_tcanvas_paint :: Ptr RawTCanvas -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_Paint" c_tcanvas_paint ::+               Ptr RawTCanvas -> CString -> IO () -foreign import ccall safe "HROOTGrafTCanvas.h TCanvas_printObj"-               c_tcanvas_printobj :: Ptr RawTCanvas -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_printObj" c_tcanvas_printobj ::+               Ptr RawTCanvas -> CString -> IO () -foreign import ccall safe "HROOTGrafTCanvas.h TCanvas_SaveAs"-               c_tcanvas_saveas :: Ptr RawTCanvas -> CString -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_SaveAs" c_tcanvas_saveas ::+               Ptr RawTCanvas -> CString -> CString -> IO () -foreign import ccall safe "HROOTGrafTCanvas.h TCanvas_Write"-               c_tcanvas_write ::+foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_Write" c_tcanvas_write ::                Ptr RawTCanvas -> CString -> CInt -> CInt -> IO CInt -foreign import ccall safe "HROOTGrafTCanvas.h TCanvas_delete"-               c_tcanvas_delete :: Ptr RawTCanvas -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_Write_" c_tcanvas_write_ ::+               Ptr RawTCanvas -> IO CInt -foreign import ccall safe "HROOTGrafTCanvas.h TCanvas_newTCanvas"-               c_tcanvas_newtcanvas ::+foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_GetLineColor" c_tcanvas_getlinecolor ::+               Ptr RawTCanvas -> IO CShort++foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_GetLineStyle" c_tcanvas_getlinestyle ::+               Ptr RawTCanvas -> IO CShort++foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_GetLineWidth" c_tcanvas_getlinewidth ::+               Ptr RawTCanvas -> IO CShort++foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_ResetAttLine" c_tcanvas_resetattline ::+               Ptr RawTCanvas -> CString -> IO ()++foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_SetLineAttributes"+               c_tcanvas_setlineattributes :: Ptr RawTCanvas -> IO ()++foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_SetLineColor" c_tcanvas_setlinecolor ::+               Ptr RawTCanvas -> CShort -> IO ()++foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_SetLineStyle" c_tcanvas_setlinestyle ::+               Ptr RawTCanvas -> CShort -> IO ()++foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_SetLineWidth" c_tcanvas_setlinewidth ::+               Ptr RawTCanvas -> CShort -> IO ()++foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_SetFillColor" c_tcanvas_setfillcolor ::+               Ptr RawTCanvas -> CInt -> IO ()++foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_SetFillStyle" c_tcanvas_setfillstyle ::+               Ptr RawTCanvas -> CInt -> IO ()++foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_ResetAttPad" c_tcanvas_resetattpad ::+               Ptr RawTCanvas -> CString -> IO ()++foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_SetBottomMargin"+               c_tcanvas_setbottommargin :: Ptr RawTCanvas -> CFloat -> IO ()++foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_SetLeftMargin" c_tcanvas_setleftmargin+               :: Ptr RawTCanvas -> CFloat -> IO ()++foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_SetRightMargin"+               c_tcanvas_setrightmargin :: Ptr RawTCanvas -> CFloat -> IO ()++foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_SetTopMargin" c_tcanvas_settopmargin ::+               Ptr RawTCanvas -> CFloat -> IO ()++foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_SetMargin" c_tcanvas_setmargin ::+               Ptr RawTCanvas -> CFloat -> CFloat -> CFloat -> CFloat -> IO ()++foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_SetAfile" c_tcanvas_setafile ::+               Ptr RawTCanvas -> CFloat -> IO ()++foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_SetXfile" c_tcanvas_setxfile ::+               Ptr RawTCanvas -> CFloat -> IO ()++foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_SetYfile" c_tcanvas_setyfile ::+               Ptr RawTCanvas -> CFloat -> IO ()++foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_SetAstat" c_tcanvas_setastat ::+               Ptr RawTCanvas -> CFloat -> IO ()++foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_SetXstat" c_tcanvas_setxstat ::+               Ptr RawTCanvas -> CFloat -> IO ()++foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_SetYstat" c_tcanvas_setystat ::+               Ptr RawTCanvas -> CFloat -> IO ()++foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_delete" c_tcanvas_delete ::+               Ptr RawTCanvas -> IO ()++foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_newTCanvas" c_tcanvas_newtcanvas ::                CString -> CString -> CInt -> CInt -> IO (Ptr RawTCanvas)++foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_ToggleEditor" c_tcanvas_toggleeditor ::+               Ptr RawTCanvas -> IO ()++foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_ToggleEventStatus"+               c_tcanvas_toggleeventstatus :: Ptr RawTCanvas -> IO ()++foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_ToggleToolBar" c_tcanvas_toggletoolbar+               :: Ptr RawTCanvas -> IO ()++foreign import ccall interruptible+               "HROOTGrafTCanvas.h TCanvas_ToggleToolTips"+               c_tcanvas_toggletooltips :: Ptr RawTCanvas -> IO ()
src/HROOT/Graf/TCanvas/Implementation.hs view
@@ -1,17 +1,32 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances,   ForeignFunctionInterface, IncoherentInstances,-  MultiParamTypeClasses, OverlappingInstances, TypeFamilies,-  TypeSynonymInstances #-}+  MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+  TypeFamilies, TypeSynonymInstances #-} module HROOT.Graf.TCanvas.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Graf.TCanvas.RawType import HROOT.Graf.TCanvas.FFI import HROOT.Graf.TCanvas.Interface import HROOT.Graf.TCanvas.Cast+import HROOT.Graf.TCanvas.RawType+import HROOT.Graf.TCanvas.Cast+import HROOT.Graf.TCanvas.Interface+import HROOT.Hist.TH1F.RawType+import HROOT.Hist.TH1F.Cast+import HROOT.Hist.TH1F.Interface+import HROOT.Graf.TView.RawType+import HROOT.Graf.TView.Cast+import HROOT.Graf.TView.Interface import HROOT.Core.TClass.RawType import HROOT.Core.TClass.Cast import HROOT.Core.TClass.Interface@@ -24,22 +39,46 @@ import HROOT.Core.TObject.RawType import HROOT.Core.TObject.Cast import HROOT.Core.TObject.Interface-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Cast-import HROOT.Core.Deletable.Interface+import HROOT.Core.TAttLine.RawType+import HROOT.Core.TAttLine.Cast+import HROOT.Core.TAttLine.Interface+import HROOT.Core.TAttFill.RawType+import HROOT.Core.TAttFill.Cast+import HROOT.Core.TAttFill.Interface+import HROOT.Core.TAttPad.RawType+import HROOT.Core.TAttPad.Cast+import HROOT.Core.TAttPad.Interface+import HROOT.Core.TQObject.RawType+import HROOT.Core.TQObject.Cast+import HROOT.Core.TQObject.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITCanvas TCanvas+instance () => ITCanvas (TCanvas) where+        toggleEditor = xform0 c_tcanvas_toggleeditor+        toggleEventStatus = xform0 c_tcanvas_toggleeventstatus+        toggleToolBar = xform0 c_tcanvas_toggletoolbar+        toggleToolTips = xform0 c_tcanvas_toggletooltips -instance ITPad TCanvas+instance () => ITPad (TCanvas) where+        drawFrame = xform5 c_tcanvas_drawframe+        getView = xform0 c_tcanvas_getview+        setView0 = xform0 c_tcanvas_setview0+        setView = xform1 c_tcanvas_setview -instance ITVirtualPad TCanvas where+instance () => ITVirtualPad (TCanvas) where         cd = xform1 c_tcanvas_cd         divide_tvirtualpad = xform5 c_tcanvas_divide_tvirtualpad+        modified = xform1 c_tcanvas_modified+        range = xform4 c_tcanvas_range         setLogx = xform1 c_tcanvas_setlogx         setLogy = xform1 c_tcanvas_setlogy         setLogz = xform1 c_tcanvas_setlogz+        update = xform0 c_tcanvas_update -instance ITObject TCanvas where+instance () => ITObject (TCanvas) where+        clear = xform1 c_tcanvas_clear         draw = xform1 c_tcanvas_draw         findObject = xform1 c_tcanvas_findobject         getName = xform0 c_tcanvas_getname@@ -48,8 +87,39 @@         printObj = xform1 c_tcanvas_printobj         saveAs = xform2 c_tcanvas_saveas         write = xform3 c_tcanvas_write+        write_ = xform0 c_tcanvas_write_ -instance IDeletable TCanvas where+instance () => ITAttLine (TCanvas) where+        getLineColor = xform0 c_tcanvas_getlinecolor+        getLineStyle = xform0 c_tcanvas_getlinestyle+        getLineWidth = xform0 c_tcanvas_getlinewidth+        resetAttLine = xform1 c_tcanvas_resetattline+        setLineAttributes = xform0 c_tcanvas_setlineattributes+        setLineColor = xform1 c_tcanvas_setlinecolor+        setLineStyle = xform1 c_tcanvas_setlinestyle+        setLineWidth = xform1 c_tcanvas_setlinewidth++instance () => ITAttFill (TCanvas) where+        setFillColor = xform1 c_tcanvas_setfillcolor+        setFillStyle = xform1 c_tcanvas_setfillstyle++instance () => ITAttPad (TCanvas) where+        resetAttPad = xform1 c_tcanvas_resetattpad+        setBottomMargin = xform1 c_tcanvas_setbottommargin+        setLeftMargin = xform1 c_tcanvas_setleftmargin+        setRightMargin = xform1 c_tcanvas_setrightmargin+        setTopMargin = xform1 c_tcanvas_settopmargin+        setMargin = xform4 c_tcanvas_setmargin+        setAfile = xform1 c_tcanvas_setafile+        setXfile = xform1 c_tcanvas_setxfile+        setYfile = xform1 c_tcanvas_setyfile+        setAstat = xform1 c_tcanvas_setastat+        setXstat = xform1 c_tcanvas_setxstat+        setYstat = xform1 c_tcanvas_setystat++instance () => ITQObject (TCanvas) where++instance () => IDeletable (TCanvas) where         delete = xform0 c_tcanvas_delete  newTCanvas ::
src/HROOT/Graf/TCanvas/Interface.hs view
@@ -4,13 +4,21 @@   TypeSynonymInstances #-} module HROOT.Graf.TCanvas.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Graf.TCanvas.RawType import HROOT.Graf.TPad.Interface -class ITPad a => ITCanvas a+class (ITPad a) => ITCanvas a where+        toggleEditor :: () => a -> IO ()+        +        toggleEventStatus :: () => a -> IO ()+        +        toggleToolBar :: () => a -> IO ()+        +        toggleToolTips :: () => a -> IO ()  upcastTCanvas :: forall a . (FPtr a, ITCanvas a) => a -> TCanvas upcastTCanvas h
src/HROOT/Graf/TCanvas/RawType.hs view
@@ -8,9 +8,9 @@ data RawTCanvas  newtype TCanvas = TCanvas (Ptr RawTCanvas)-                deriving (Eq, Ord, Show)+                    deriving (Eq, Ord, Show) -instance FPtr TCanvas where+instance () => FPtr (TCanvas) where         type Raw TCanvas = RawTCanvas         get_fptr (TCanvas ptr) = ptr         cast_fptr_to_obj = TCanvas
src/HROOT/Graf/TCrown/Cast.hs view
@@ -8,10 +8,10 @@ import HROOT.Graf.TCrown.RawType import HROOT.Graf.TCrown.Interface -instance (ITCrown a, FPtr a) => Castable a (Ptr RawTCrown) where+instance (ITCrown a, FPtr a) => Castable (a) (Ptr RawTCrown) where         cast x f = f (castPtr (get_fptr x))         uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TCrown (Ptr RawTCrown) where+instance () => Castable (TCrown) (Ptr RawTCrown) where         cast x f = f (castPtr (get_fptr x))         uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Graf/TCrown/FFI.hsc view
@@ -1,73 +1,96 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Graf.TCrown.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Graf.TCrown.RawType+import HROOT.Graf.TCrown.RawType import HROOT.Core.TObject.RawType import HROOT.Core.TClass.RawType -foreign import ccall safe "HROOTGrafTCrown.h TCrown_Draw"+foreign import ccall interruptible "HROOTGrafTCrown.h TCrown_Clear"+               c_tcrown_clear :: Ptr RawTCrown -> CString -> IO ()++foreign import ccall interruptible "HROOTGrafTCrown.h TCrown_Draw"                c_tcrown_draw :: Ptr RawTCrown -> CString -> IO () -foreign import ccall safe "HROOTGrafTCrown.h TCrown_FindObject"-               c_tcrown_findobject ::+foreign import ccall interruptible+               "HROOTGrafTCrown.h TCrown_FindObject" c_tcrown_findobject ::                Ptr RawTCrown -> CString -> IO (Ptr RawTObject) -foreign import ccall safe "HROOTGrafTCrown.h TCrown_GetName"-               c_tcrown_getname :: Ptr RawTCrown -> IO CString+foreign import ccall interruptible+               "HROOTGrafTCrown.h TCrown_GetName" c_tcrown_getname ::+               Ptr RawTCrown -> IO CString -foreign import ccall safe "HROOTGrafTCrown.h TCrown_IsA"+foreign import ccall interruptible "HROOTGrafTCrown.h TCrown_IsA"                c_tcrown_isa :: Ptr RawTCrown -> IO (Ptr RawTClass) -foreign import ccall safe "HROOTGrafTCrown.h TCrown_Paint"+foreign import ccall interruptible "HROOTGrafTCrown.h TCrown_Paint"                c_tcrown_paint :: Ptr RawTCrown -> CString -> IO () -foreign import ccall safe "HROOTGrafTCrown.h TCrown_printObj"-               c_tcrown_printobj :: Ptr RawTCrown -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCrown.h TCrown_printObj" c_tcrown_printobj ::+               Ptr RawTCrown -> CString -> IO () -foreign import ccall safe "HROOTGrafTCrown.h TCrown_SaveAs"-               c_tcrown_saveas :: Ptr RawTCrown -> CString -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCrown.h TCrown_SaveAs" c_tcrown_saveas ::+               Ptr RawTCrown -> CString -> CString -> IO () -foreign import ccall safe "HROOTGrafTCrown.h TCrown_Write"+foreign import ccall interruptible "HROOTGrafTCrown.h TCrown_Write"                c_tcrown_write ::                Ptr RawTCrown -> CString -> CInt -> CInt -> IO CInt -foreign import ccall safe "HROOTGrafTCrown.h TCrown_GetLineColor"-               c_tcrown_getlinecolor :: Ptr RawTCrown -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTCrown.h TCrown_Write_" c_tcrown_write_ ::+               Ptr RawTCrown -> IO CInt -foreign import ccall safe "HROOTGrafTCrown.h TCrown_GetLineStyle"-               c_tcrown_getlinestyle :: Ptr RawTCrown -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTCrown.h TCrown_GetLineColor" c_tcrown_getlinecolor ::+               Ptr RawTCrown -> IO CShort -foreign import ccall safe "HROOTGrafTCrown.h TCrown_GetLineWidth"-               c_tcrown_getlinewidth :: Ptr RawTCrown -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTCrown.h TCrown_GetLineStyle" c_tcrown_getlinestyle ::+               Ptr RawTCrown -> IO CShort -foreign import ccall safe "HROOTGrafTCrown.h TCrown_ResetAttLine"-               c_tcrown_resetattline :: Ptr RawTCrown -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCrown.h TCrown_GetLineWidth" c_tcrown_getlinewidth ::+               Ptr RawTCrown -> IO CShort -foreign import ccall safe+foreign import ccall interruptible+               "HROOTGrafTCrown.h TCrown_ResetAttLine" c_tcrown_resetattline ::+               Ptr RawTCrown -> CString -> IO ()++foreign import ccall interruptible                "HROOTGrafTCrown.h TCrown_SetLineAttributes"                c_tcrown_setlineattributes :: Ptr RawTCrown -> IO () -foreign import ccall safe "HROOTGrafTCrown.h TCrown_SetLineColor"-               c_tcrown_setlinecolor :: Ptr RawTCrown -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCrown.h TCrown_SetLineColor" c_tcrown_setlinecolor ::+               Ptr RawTCrown -> CShort -> IO () -foreign import ccall safe "HROOTGrafTCrown.h TCrown_SetLineStyle"-               c_tcrown_setlinestyle :: Ptr RawTCrown -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCrown.h TCrown_SetLineStyle" c_tcrown_setlinestyle ::+               Ptr RawTCrown -> CShort -> IO () -foreign import ccall safe "HROOTGrafTCrown.h TCrown_SetLineWidth"-               c_tcrown_setlinewidth :: Ptr RawTCrown -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCrown.h TCrown_SetLineWidth" c_tcrown_setlinewidth ::+               Ptr RawTCrown -> CShort -> IO () -foreign import ccall safe "HROOTGrafTCrown.h TCrown_SetFillColor"-               c_tcrown_setfillcolor :: Ptr RawTCrown -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCrown.h TCrown_SetFillColor" c_tcrown_setfillcolor ::+               Ptr RawTCrown -> CInt -> IO () -foreign import ccall safe "HROOTGrafTCrown.h TCrown_SetFillStyle"-               c_tcrown_setfillstyle :: Ptr RawTCrown -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCrown.h TCrown_SetFillStyle" c_tcrown_setfillstyle ::+               Ptr RawTCrown -> CInt -> IO () -foreign import ccall safe "HROOTGrafTCrown.h TCrown_delete"-               c_tcrown_delete :: Ptr RawTCrown -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCrown.h TCrown_delete" c_tcrown_delete ::+               Ptr RawTCrown -> IO () -foreign import ccall safe "HROOTGrafTCrown.h TCrown_newTCrown"-               c_tcrown_newtcrown ::+foreign import ccall interruptible+               "HROOTGrafTCrown.h TCrown_newTCrown" c_tcrown_newtcrown ::                CDouble ->                  CDouble ->                    CDouble -> CDouble -> CDouble -> CDouble -> IO (Ptr RawTCrown)
src/HROOT/Graf/TCrown/Implementation.hs view
@@ -1,17 +1,26 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances,   ForeignFunctionInterface, IncoherentInstances,-  MultiParamTypeClasses, OverlappingInstances, TypeFamilies,-  TypeSynonymInstances #-}+  MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+  TypeFamilies, TypeSynonymInstances #-} module HROOT.Graf.TCrown.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Graf.TCrown.RawType import HROOT.Graf.TCrown.FFI import HROOT.Graf.TCrown.Interface import HROOT.Graf.TCrown.Cast+import HROOT.Graf.TCrown.RawType+import HROOT.Graf.TCrown.Cast+import HROOT.Graf.TCrown.Interface import HROOT.Core.TClass.RawType import HROOT.Core.TClass.Cast import HROOT.Core.TClass.Interface@@ -27,15 +36,16 @@ import HROOT.Core.TAttFill.RawType import HROOT.Core.TAttFill.Cast import HROOT.Core.TAttFill.Interface-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Cast-import HROOT.Core.Deletable.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITCrown TCrown+instance () => ITCrown (TCrown) where -instance ITEllipse TCrown+instance () => ITEllipse (TCrown) where -instance ITObject TCrown where+instance () => ITObject (TCrown) where+        clear = xform1 c_tcrown_clear         draw = xform1 c_tcrown_draw         findObject = xform1 c_tcrown_findobject         getName = xform0 c_tcrown_getname@@ -44,8 +54,9 @@         printObj = xform1 c_tcrown_printobj         saveAs = xform2 c_tcrown_saveas         write = xform3 c_tcrown_write+        write_ = xform0 c_tcrown_write_ -instance ITAttLine TCrown where+instance () => ITAttLine (TCrown) where         getLineColor = xform0 c_tcrown_getlinecolor         getLineStyle = xform0 c_tcrown_getlinestyle         getLineWidth = xform0 c_tcrown_getlinewidth@@ -55,14 +66,15 @@         setLineStyle = xform1 c_tcrown_setlinestyle         setLineWidth = xform1 c_tcrown_setlinewidth -instance ITAttFill TCrown where+instance () => ITAttFill (TCrown) where         setFillColor = xform1 c_tcrown_setfillcolor         setFillStyle = xform1 c_tcrown_setfillstyle -instance IDeletable TCrown where+instance () => IDeletable (TCrown) where         delete = xform0 c_tcrown_delete  newTCrown ::+            () =>             CDouble ->               CDouble -> CDouble -> CDouble -> CDouble -> CDouble -> IO TCrown newTCrown = xform5 c_tcrown_newtcrown
src/HROOT/Graf/TCrown/Interface.hs view
@@ -4,13 +4,14 @@   TypeSynonymInstances #-} module HROOT.Graf.TCrown.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Graf.TCrown.RawType import HROOT.Graf.TEllipse.Interface -class ITEllipse a => ITCrown a+class (ITEllipse a) => ITCrown a where  upcastTCrown :: forall a . (FPtr a, ITCrown a) => a -> TCrown upcastTCrown h
src/HROOT/Graf/TCrown/RawType.hs view
@@ -8,9 +8,9 @@ data RawTCrown  newtype TCrown = TCrown (Ptr RawTCrown)-               deriving (Eq, Ord, Show)+                   deriving (Eq, Ord, Show) -instance FPtr TCrown where+instance () => FPtr (TCrown) where         type Raw TCrown = RawTCrown         get_fptr (TCrown ptr) = ptr         cast_fptr_to_obj = TCrown
src/HROOT/Graf/TCutG/Cast.hs view
@@ -8,10 +8,10 @@ import HROOT.Graf.TCutG.RawType import HROOT.Graf.TCutG.Interface -instance (ITCutG a, FPtr a) => Castable a (Ptr RawTCutG) where+instance (ITCutG a, FPtr a) => Castable (a) (Ptr RawTCutG) where         cast x f = f (castPtr (get_fptr x))         uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TCutG (Ptr RawTCutG) where+instance () => Castable (TCutG) (Ptr RawTCutG) where         cast x f = f (castPtr (get_fptr x))         uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Graf/TCutG/FFI.hsc view
@@ -1,213 +1,261 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Graf.TCutG.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Graf.TCutG.RawType+import HROOT.Graf.TCutG.RawType import HROOT.Hist.TF1.RawType import HROOT.Hist.TH1F.RawType import HROOT.Hist.TAxis.RawType import HROOT.Core.TObject.RawType import HROOT.Core.TClass.RawType -foreign import ccall safe "HROOTGrafTCutG.h TCutG_Apply"+foreign import ccall interruptible "HROOTGrafTCutG.h TCutG_Apply"                c_tcutg_apply :: Ptr RawTCutG -> Ptr RawTF1 -> IO () -foreign import ccall safe "HROOTGrafTCutG.h TCutG_Chisquare"-               c_tcutg_chisquare :: Ptr RawTCutG -> Ptr RawTF1 -> IO CDouble+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_Chisquare" c_tcutg_chisquare ::+               Ptr RawTCutG -> Ptr RawTF1 -> IO CDouble -foreign import ccall safe "HROOTGrafTCutG.h TCutG_DrawGraph"-               c_tcutg_drawgraph ::+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_DrawGraph" c_tcutg_drawgraph ::                Ptr RawTCutG ->-                 CInt -> (Ptr CDouble) -> (Ptr CDouble) -> CString -> IO ()+                 CInt -> Ptr CDouble -> Ptr CDouble -> CString -> IO () -foreign import ccall safe "HROOTGrafTCutG.h TCutG_drawPanelTGraph"-               c_tcutg_drawpaneltgraph :: Ptr RawTCutG -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_drawPanelTGraph" c_tcutg_drawpaneltgraph ::+               Ptr RawTCutG -> IO () -foreign import ccall safe "HROOTGrafTCutG.h TCutG_Expand"+foreign import ccall interruptible "HROOTGrafTCutG.h TCutG_Expand"                c_tcutg_expand :: Ptr RawTCutG -> CInt -> CInt -> IO () -foreign import ccall safe "HROOTGrafTCutG.h TCutG_FitPanelTGraph"-               c_tcutg_fitpaneltgraph :: Ptr RawTCutG -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_FitPanelTGraph" c_tcutg_fitpaneltgraph ::+               Ptr RawTCutG -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTCutG.h TCutG_getCorrelationFactorTGraph"                c_tcutg_getcorrelationfactortgraph :: Ptr RawTCutG -> IO CDouble -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTCutG.h TCutG_getCovarianceTGraph"                c_tcutg_getcovariancetgraph :: Ptr RawTCutG -> IO CDouble -foreign import ccall safe "HROOTGrafTCutG.h TCutG_getMeanTGraph"-               c_tcutg_getmeantgraph :: Ptr RawTCutG -> CInt -> IO CDouble+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_getMeanTGraph" c_tcutg_getmeantgraph ::+               Ptr RawTCutG -> CInt -> IO CDouble -foreign import ccall safe "HROOTGrafTCutG.h TCutG_getRMSTGraph"-               c_tcutg_getrmstgraph :: Ptr RawTCutG -> CInt -> IO CDouble+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_getRMSTGraph" c_tcutg_getrmstgraph ::+               Ptr RawTCutG -> CInt -> IO CDouble -foreign import ccall safe "HROOTGrafTCutG.h TCutG_GetErrorX"-               c_tcutg_geterrorx :: Ptr RawTCutG -> CInt -> IO CDouble+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_GetErrorX" c_tcutg_geterrorx ::+               Ptr RawTCutG -> CInt -> IO CDouble -foreign import ccall safe "HROOTGrafTCutG.h TCutG_GetErrorY"-               c_tcutg_geterrory :: Ptr RawTCutG -> CInt -> IO CDouble+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_GetErrorY" c_tcutg_geterrory ::+               Ptr RawTCutG -> CInt -> IO CDouble -foreign import ccall safe "HROOTGrafTCutG.h TCutG_GetErrorXhigh"-               c_tcutg_geterrorxhigh :: Ptr RawTCutG -> CInt -> IO CDouble+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_GetErrorXhigh" c_tcutg_geterrorxhigh ::+               Ptr RawTCutG -> CInt -> IO CDouble -foreign import ccall safe "HROOTGrafTCutG.h TCutG_GetErrorXlow"-               c_tcutg_geterrorxlow :: Ptr RawTCutG -> CInt -> IO CDouble+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_GetErrorXlow" c_tcutg_geterrorxlow ::+               Ptr RawTCutG -> CInt -> IO CDouble -foreign import ccall safe "HROOTGrafTCutG.h TCutG_GetErrorYhigh"-               c_tcutg_geterroryhigh :: Ptr RawTCutG -> CInt -> IO CDouble+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_GetErrorYhigh" c_tcutg_geterroryhigh ::+               Ptr RawTCutG -> CInt -> IO CDouble -foreign import ccall safe "HROOTGrafTCutG.h TCutG_GetErrorYlow"-               c_tcutg_geterrorylow :: Ptr RawTCutG -> CInt -> IO CDouble+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_GetErrorYlow" c_tcutg_geterrorylow ::+               Ptr RawTCutG -> CInt -> IO CDouble -foreign import ccall safe "HROOTGrafTCutG.h TCutG_InitExpo"-               c_tcutg_initexpo :: Ptr RawTCutG -> CDouble -> CDouble -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_InitExpo" c_tcutg_initexpo ::+               Ptr RawTCutG -> CDouble -> CDouble -> IO () -foreign import ccall safe "HROOTGrafTCutG.h TCutG_InitGaus"-               c_tcutg_initgaus :: Ptr RawTCutG -> CDouble -> CDouble -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_InitGaus" c_tcutg_initgaus ::+               Ptr RawTCutG -> CDouble -> CDouble -> IO () -foreign import ccall safe "HROOTGrafTCutG.h TCutG_InitPolynom"-               c_tcutg_initpolynom :: Ptr RawTCutG -> CDouble -> CDouble -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_InitPolynom" c_tcutg_initpolynom ::+               Ptr RawTCutG -> CDouble -> CDouble -> IO () -foreign import ccall safe "HROOTGrafTCutG.h TCutG_InsertPoint"-               c_tcutg_insertpoint :: Ptr RawTCutG -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_InsertPoint" c_tcutg_insertpoint ::+               Ptr RawTCutG -> IO CInt -foreign import ccall safe "HROOTGrafTCutG.h TCutG_integralTGraph"-               c_tcutg_integraltgraph ::+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_integralTGraph" c_tcutg_integraltgraph ::                Ptr RawTCutG -> CInt -> CInt -> IO CDouble -foreign import ccall safe "HROOTGrafTCutG.h TCutG_IsEditable"-               c_tcutg_iseditable :: Ptr RawTCutG -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_IsEditable" c_tcutg_iseditable ::+               Ptr RawTCutG -> IO CBool -foreign import ccall safe "HROOTGrafTCutG.h TCutG_isInsideTGraph"-               c_tcutg_isinsidetgraph ::+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_isInsideTGraph" c_tcutg_isinsidetgraph ::                Ptr RawTCutG -> CDouble -> CDouble -> IO CInt -foreign import ccall safe "HROOTGrafTCutG.h TCutG_LeastSquareFit"-               c_tcutg_leastsquarefit ::-               Ptr RawTCutG ->-                 CInt -> (Ptr CDouble) -> CDouble -> CDouble -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_LeastSquareFit" c_tcutg_leastsquarefit ::+               Ptr RawTCutG -> CInt -> Ptr CDouble -> CDouble -> CDouble -> IO () -foreign import ccall safe "HROOTGrafTCutG.h TCutG_PaintStats"-               c_tcutg_paintstats :: Ptr RawTCutG -> Ptr RawTF1 -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_PaintStats" c_tcutg_paintstats ::+               Ptr RawTCutG -> Ptr RawTF1 -> IO () -foreign import ccall safe "HROOTGrafTCutG.h TCutG_RemovePoint"-               c_tcutg_removepoint :: Ptr RawTCutG -> CInt -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_RemovePoint" c_tcutg_removepoint ::+               Ptr RawTCutG -> CInt -> IO CInt -foreign import ccall safe "HROOTGrafTCutG.h TCutG_SetEditable"-               c_tcutg_seteditable :: Ptr RawTCutG -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_SetEditable" c_tcutg_seteditable ::+               Ptr RawTCutG -> CBool -> IO () -foreign import ccall safe "HROOTGrafTCutG.h TCutG_SetHistogram"-               c_tcutg_sethistogram :: Ptr RawTCutG -> Ptr RawTH1F -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_SetHistogram" c_tcutg_sethistogram ::+               Ptr RawTCutG -> Ptr RawTH1F -> IO () -foreign import ccall safe "HROOTGrafTCutG.h TCutG_setMaximumTGraph"-               c_tcutg_setmaximumtgraph :: Ptr RawTCutG -> CDouble -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_setMaximumTGraph" c_tcutg_setmaximumtgraph+               :: Ptr RawTCutG -> CDouble -> IO () -foreign import ccall safe "HROOTGrafTCutG.h TCutG_setMinimumTGraph"-               c_tcutg_setminimumtgraph :: Ptr RawTCutG -> CDouble -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_setMinimumTGraph" c_tcutg_setminimumtgraph+               :: Ptr RawTCutG -> CDouble -> IO () -foreign import ccall safe "HROOTGrafTCutG.h TCutG_Set" c_tcutg_set-               :: Ptr RawTCutG -> CInt -> IO ()+foreign import ccall interruptible "HROOTGrafTCutG.h TCutG_Set"+               c_tcutg_set :: Ptr RawTCutG -> CInt -> IO () -foreign import ccall safe "HROOTGrafTCutG.h TCutG_SetPoint"-               c_tcutg_setpoint ::+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_SetPoint" c_tcutg_setpoint ::                Ptr RawTCutG -> CInt -> CDouble -> CDouble -> IO () -foreign import ccall safe "HROOTGrafTCutG.h TCutG_SetName"+foreign import ccall interruptible "HROOTGrafTCutG.h TCutG_SetName"                c_tcutg_setname :: Ptr RawTCutG -> CString -> IO () -foreign import ccall safe "HROOTGrafTCutG.h TCutG_SetNameTitle"-               c_tcutg_setnametitle :: Ptr RawTCutG -> CString -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_SetNameTitle" c_tcutg_setnametitle ::+               Ptr RawTCutG -> CString -> CString -> IO () -foreign import ccall safe "HROOTGrafTCutG.h TCutG_SetTitle"-               c_tcutg_settitle :: Ptr RawTCutG -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_SetTitle" c_tcutg_settitle ::+               Ptr RawTCutG -> CString -> IO () -foreign import ccall safe "HROOTGrafTCutG.h TCutG_GetLineColor"-               c_tcutg_getlinecolor :: Ptr RawTCutG -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_GetLineColor" c_tcutg_getlinecolor ::+               Ptr RawTCutG -> IO CShort -foreign import ccall safe "HROOTGrafTCutG.h TCutG_GetLineStyle"-               c_tcutg_getlinestyle :: Ptr RawTCutG -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_GetLineStyle" c_tcutg_getlinestyle ::+               Ptr RawTCutG -> IO CShort -foreign import ccall safe "HROOTGrafTCutG.h TCutG_GetLineWidth"-               c_tcutg_getlinewidth :: Ptr RawTCutG -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_GetLineWidth" c_tcutg_getlinewidth ::+               Ptr RawTCutG -> IO CShort -foreign import ccall safe "HROOTGrafTCutG.h TCutG_ResetAttLine"-               c_tcutg_resetattline :: Ptr RawTCutG -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_ResetAttLine" c_tcutg_resetattline ::+               Ptr RawTCutG -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTCutG.h TCutG_SetLineAttributes"                c_tcutg_setlineattributes :: Ptr RawTCutG -> IO () -foreign import ccall safe "HROOTGrafTCutG.h TCutG_SetLineColor"-               c_tcutg_setlinecolor :: Ptr RawTCutG -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_SetLineColor" c_tcutg_setlinecolor ::+               Ptr RawTCutG -> CShort -> IO () -foreign import ccall safe "HROOTGrafTCutG.h TCutG_SetLineStyle"-               c_tcutg_setlinestyle :: Ptr RawTCutG -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_SetLineStyle" c_tcutg_setlinestyle ::+               Ptr RawTCutG -> CShort -> IO () -foreign import ccall safe "HROOTGrafTCutG.h TCutG_SetLineWidth"-               c_tcutg_setlinewidth :: Ptr RawTCutG -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_SetLineWidth" c_tcutg_setlinewidth ::+               Ptr RawTCutG -> CShort -> IO () -foreign import ccall safe "HROOTGrafTCutG.h TCutG_SetFillColor"-               c_tcutg_setfillcolor :: Ptr RawTCutG -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_SetFillColor" c_tcutg_setfillcolor ::+               Ptr RawTCutG -> CInt -> IO () -foreign import ccall safe "HROOTGrafTCutG.h TCutG_SetFillStyle"-               c_tcutg_setfillstyle :: Ptr RawTCutG -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_SetFillStyle" c_tcutg_setfillstyle ::+               Ptr RawTCutG -> CInt -> IO () -foreign import ccall safe "HROOTGrafTCutG.h TCutG_GetMarkerColor"-               c_tcutg_getmarkercolor :: Ptr RawTCutG -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_GetMarkerColor" c_tcutg_getmarkercolor ::+               Ptr RawTCutG -> IO CShort -foreign import ccall safe "HROOTGrafTCutG.h TCutG_GetMarkerStyle"-               c_tcutg_getmarkerstyle :: Ptr RawTCutG -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_GetMarkerStyle" c_tcutg_getmarkerstyle ::+               Ptr RawTCutG -> IO CShort -foreign import ccall safe "HROOTGrafTCutG.h TCutG_GetMarkerSize"-               c_tcutg_getmarkersize :: Ptr RawTCutG -> IO CDouble+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_GetMarkerSize" c_tcutg_getmarkersize ::+               Ptr RawTCutG -> IO CFloat -foreign import ccall safe "HROOTGrafTCutG.h TCutG_ResetAttMarker"-               c_tcutg_resetattmarker :: Ptr RawTCutG -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_ResetAttMarker" c_tcutg_resetattmarker ::+               Ptr RawTCutG -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTCutG.h TCutG_SetMarkerAttributes"                c_tcutg_setmarkerattributes :: Ptr RawTCutG -> IO () -foreign import ccall safe "HROOTGrafTCutG.h TCutG_SetMarkerColor"-               c_tcutg_setmarkercolor :: Ptr RawTCutG -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_SetMarkerColor" c_tcutg_setmarkercolor ::+               Ptr RawTCutG -> CShort -> IO () -foreign import ccall safe "HROOTGrafTCutG.h TCutG_SetMarkerStyle"-               c_tcutg_setmarkerstyle :: Ptr RawTCutG -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_SetMarkerStyle" c_tcutg_setmarkerstyle ::+               Ptr RawTCutG -> CShort -> IO () -foreign import ccall safe "HROOTGrafTCutG.h TCutG_SetMarkerSize"-               c_tcutg_setmarkersize :: Ptr RawTCutG -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_SetMarkerSize" c_tcutg_setmarkersize ::+               Ptr RawTCutG -> CShort -> IO () -foreign import ccall safe "HROOTGrafTCutG.h TCutG_Draw"+foreign import ccall interruptible "HROOTGrafTCutG.h TCutG_Clear"+               c_tcutg_clear :: Ptr RawTCutG -> CString -> IO ()++foreign import ccall interruptible "HROOTGrafTCutG.h TCutG_Draw"                c_tcutg_draw :: Ptr RawTCutG -> CString -> IO () -foreign import ccall safe "HROOTGrafTCutG.h TCutG_FindObject"-               c_tcutg_findobject ::+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_FindObject" c_tcutg_findobject ::                Ptr RawTCutG -> CString -> IO (Ptr RawTObject) -foreign import ccall safe "HROOTGrafTCutG.h TCutG_GetName"+foreign import ccall interruptible "HROOTGrafTCutG.h TCutG_GetName"                c_tcutg_getname :: Ptr RawTCutG -> IO CString -foreign import ccall safe "HROOTGrafTCutG.h TCutG_IsA" c_tcutg_isa-               :: Ptr RawTCutG -> IO (Ptr RawTClass)+foreign import ccall interruptible "HROOTGrafTCutG.h TCutG_IsA"+               c_tcutg_isa :: Ptr RawTCutG -> IO (Ptr RawTClass) -foreign import ccall safe "HROOTGrafTCutG.h TCutG_Paint"+foreign import ccall interruptible "HROOTGrafTCutG.h TCutG_Paint"                c_tcutg_paint :: Ptr RawTCutG -> CString -> IO () -foreign import ccall safe "HROOTGrafTCutG.h TCutG_printObj"-               c_tcutg_printobj :: Ptr RawTCutG -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_printObj" c_tcutg_printobj ::+               Ptr RawTCutG -> CString -> IO () -foreign import ccall safe "HROOTGrafTCutG.h TCutG_SaveAs"+foreign import ccall interruptible "HROOTGrafTCutG.h TCutG_SaveAs"                c_tcutg_saveas :: Ptr RawTCutG -> CString -> CString -> IO () -foreign import ccall safe "HROOTGrafTCutG.h TCutG_Write"+foreign import ccall interruptible "HROOTGrafTCutG.h TCutG_Write"                c_tcutg_write :: Ptr RawTCutG -> CString -> CInt -> CInt -> IO CInt -foreign import ccall safe "HROOTGrafTCutG.h TCutG_delete"+foreign import ccall interruptible "HROOTGrafTCutG.h TCutG_Write_"+               c_tcutg_write_ :: Ptr RawTCutG -> IO CInt++foreign import ccall interruptible "HROOTGrafTCutG.h TCutG_delete"                c_tcutg_delete :: Ptr RawTCutG -> IO () -foreign import ccall safe "HROOTGrafTCutG.h TCutG_newTCutG"-               c_tcutg_newtcutg ::-               CString ->-                 CInt -> (Ptr CDouble) -> (Ptr CDouble) -> IO (Ptr RawTCutG)+foreign import ccall interruptible+               "HROOTGrafTCutG.h TCutG_newTCutG" c_tcutg_newtcutg ::+               CString -> CInt -> Ptr CDouble -> Ptr CDouble -> IO (Ptr RawTCutG)
src/HROOT/Graf/TCutG/Implementation.hs view
@@ -1,17 +1,26 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances,   ForeignFunctionInterface, IncoherentInstances,-  MultiParamTypeClasses, OverlappingInstances, TypeFamilies,-  TypeSynonymInstances #-}+  MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+  TypeFamilies, TypeSynonymInstances #-} module HROOT.Graf.TCutG.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Graf.TCutG.RawType import HROOT.Graf.TCutG.FFI import HROOT.Graf.TCutG.Interface import HROOT.Graf.TCutG.Cast+import HROOT.Graf.TCutG.RawType+import HROOT.Graf.TCutG.Cast+import HROOT.Graf.TCutG.Interface import HROOT.Hist.TF1.RawType import HROOT.Hist.TF1.Cast import HROOT.Hist.TF1.Interface@@ -42,13 +51,13 @@ import HROOT.Core.TObject.RawType import HROOT.Core.TObject.Cast import HROOT.Core.TObject.Interface-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Cast-import HROOT.Core.Deletable.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITCutG TCutG+instance () => ITCutG (TCutG) where -instance ITGraph TCutG where+instance () => ITGraph (TCutG) where         apply = xform1 c_tcutg_apply         chisquare = xform1 c_tcutg_chisquare         drawGraph = xform4 c_tcutg_drawgraph@@ -83,12 +92,12 @@         set = xform1 c_tcutg_set         setPoint = xform3 c_tcutg_setpoint -instance ITNamed TCutG where+instance () => ITNamed (TCutG) where         setName = xform1 c_tcutg_setname         setNameTitle = xform2 c_tcutg_setnametitle         setTitle = xform1 c_tcutg_settitle -instance ITAttLine TCutG where+instance () => ITAttLine (TCutG) where         getLineColor = xform0 c_tcutg_getlinecolor         getLineStyle = xform0 c_tcutg_getlinestyle         getLineWidth = xform0 c_tcutg_getlinewidth@@ -98,11 +107,11 @@         setLineStyle = xform1 c_tcutg_setlinestyle         setLineWidth = xform1 c_tcutg_setlinewidth -instance ITAttFill TCutG where+instance () => ITAttFill (TCutG) where         setFillColor = xform1 c_tcutg_setfillcolor         setFillStyle = xform1 c_tcutg_setfillstyle -instance ITAttMarker TCutG where+instance () => ITAttMarker (TCutG) where         getMarkerColor = xform0 c_tcutg_getmarkercolor         getMarkerStyle = xform0 c_tcutg_getmarkerstyle         getMarkerSize = xform0 c_tcutg_getmarkersize@@ -112,7 +121,8 @@         setMarkerStyle = xform1 c_tcutg_setmarkerstyle         setMarkerSize = xform1 c_tcutg_setmarkersize -instance ITObject TCutG where+instance () => ITObject (TCutG) where+        clear = xform1 c_tcutg_clear         draw = xform1 c_tcutg_draw         findObject = xform1 c_tcutg_findobject         getName = xform0 c_tcutg_getname@@ -121,11 +131,12 @@         printObj = xform1 c_tcutg_printobj         saveAs = xform2 c_tcutg_saveas         write = xform3 c_tcutg_write+        write_ = xform0 c_tcutg_write_ -instance IDeletable TCutG where+instance () => IDeletable (TCutG) where         delete = xform0 c_tcutg_delete  newTCutG ::-           Castable c0 CString =>-           c0 -> CInt -> (Ptr CDouble) -> (Ptr CDouble) -> IO TCutG+           (Castable c0 CString) =>+           c0 -> CInt -> Ptr CDouble -> Ptr CDouble -> IO TCutG newTCutG = xform3 c_tcutg_newtcutg
src/HROOT/Graf/TCutG/Interface.hs view
@@ -4,13 +4,14 @@   TypeSynonymInstances #-} module HROOT.Graf.TCutG.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Graf.TCutG.RawType import HROOT.Hist.TGraph.Interface -class ITGraph a => ITCutG a+class (ITGraph a) => ITCutG a where  upcastTCutG :: forall a . (FPtr a, ITCutG a) => a -> TCutG upcastTCutG h
src/HROOT/Graf/TCutG/RawType.hs view
@@ -8,9 +8,9 @@ data RawTCutG  newtype TCutG = TCutG (Ptr RawTCutG)-              deriving (Eq, Ord, Show)+                  deriving (Eq, Ord, Show) -instance FPtr TCutG where+instance () => FPtr (TCutG) where         type Raw TCutG = RawTCutG         get_fptr (TCutG ptr) = ptr         cast_fptr_to_obj = TCutG
src/HROOT/Graf/TEllipse/Cast.hs view
@@ -8,11 +8,11 @@ import HROOT.Graf.TEllipse.RawType import HROOT.Graf.TEllipse.Interface -instance (ITEllipse a, FPtr a) => Castable a (Ptr RawTEllipse)+instance (ITEllipse a, FPtr a) => Castable (a) (Ptr RawTEllipse)          where         cast x f = f (castPtr (get_fptr x))         uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TEllipse (Ptr RawTEllipse) where+instance () => Castable (TEllipse) (Ptr RawTEllipse) where         cast x f = f (castPtr (get_fptr x))         uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Graf/TEllipse/FFI.hsc view
@@ -1,81 +1,99 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Graf.TEllipse.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Graf.TEllipse.RawType+import HROOT.Graf.TEllipse.RawType import HROOT.Core.TObject.RawType import HROOT.Core.TClass.RawType -foreign import ccall safe "HROOTGrafTEllipse.h TEllipse_Draw"-               c_tellipse_draw :: Ptr RawTEllipse -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTEllipse.h TEllipse_Clear" c_tellipse_clear ::+               Ptr RawTEllipse -> CString -> IO () -foreign import ccall safe "HROOTGrafTEllipse.h TEllipse_FindObject"-               c_tellipse_findobject ::+foreign import ccall interruptible+               "HROOTGrafTEllipse.h TEllipse_Draw" c_tellipse_draw ::+               Ptr RawTEllipse -> CString -> IO ()++foreign import ccall interruptible+               "HROOTGrafTEllipse.h TEllipse_FindObject" c_tellipse_findobject ::                Ptr RawTEllipse -> CString -> IO (Ptr RawTObject) -foreign import ccall safe "HROOTGrafTEllipse.h TEllipse_GetName"-               c_tellipse_getname :: Ptr RawTEllipse -> IO CString+foreign import ccall interruptible+               "HROOTGrafTEllipse.h TEllipse_GetName" c_tellipse_getname ::+               Ptr RawTEllipse -> IO CString -foreign import ccall safe "HROOTGrafTEllipse.h TEllipse_IsA"-               c_tellipse_isa :: Ptr RawTEllipse -> IO (Ptr RawTClass)+foreign import ccall interruptible+               "HROOTGrafTEllipse.h TEllipse_IsA" c_tellipse_isa ::+               Ptr RawTEllipse -> IO (Ptr RawTClass) -foreign import ccall safe "HROOTGrafTEllipse.h TEllipse_Paint"-               c_tellipse_paint :: Ptr RawTEllipse -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTEllipse.h TEllipse_Paint" c_tellipse_paint ::+               Ptr RawTEllipse -> CString -> IO () -foreign import ccall safe "HROOTGrafTEllipse.h TEllipse_printObj"-               c_tellipse_printobj :: Ptr RawTEllipse -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTEllipse.h TEllipse_printObj" c_tellipse_printobj ::+               Ptr RawTEllipse -> CString -> IO () -foreign import ccall safe "HROOTGrafTEllipse.h TEllipse_SaveAs"-               c_tellipse_saveas :: Ptr RawTEllipse -> CString -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTEllipse.h TEllipse_SaveAs" c_tellipse_saveas ::+               Ptr RawTEllipse -> CString -> CString -> IO () -foreign import ccall safe "HROOTGrafTEllipse.h TEllipse_Write"-               c_tellipse_write ::+foreign import ccall interruptible+               "HROOTGrafTEllipse.h TEllipse_Write" c_tellipse_write ::                Ptr RawTEllipse -> CString -> CInt -> CInt -> IO CInt -foreign import ccall safe+foreign import ccall interruptible+               "HROOTGrafTEllipse.h TEllipse_Write_" c_tellipse_write_ ::+               Ptr RawTEllipse -> IO CInt++foreign import ccall interruptible                "HROOTGrafTEllipse.h TEllipse_GetLineColor" c_tellipse_getlinecolor-               :: Ptr RawTEllipse -> IO CInt+               :: Ptr RawTEllipse -> IO CShort -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTEllipse.h TEllipse_GetLineStyle" c_tellipse_getlinestyle-               :: Ptr RawTEllipse -> IO CInt+               :: Ptr RawTEllipse -> IO CShort -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTEllipse.h TEllipse_GetLineWidth" c_tellipse_getlinewidth-               :: Ptr RawTEllipse -> IO CInt+               :: Ptr RawTEllipse -> IO CShort -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTEllipse.h TEllipse_ResetAttLine" c_tellipse_resetattline                :: Ptr RawTEllipse -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTEllipse.h TEllipse_SetLineAttributes"                c_tellipse_setlineattributes :: Ptr RawTEllipse -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTEllipse.h TEllipse_SetLineColor" c_tellipse_setlinecolor-               :: Ptr RawTEllipse -> CInt -> IO ()+               :: Ptr RawTEllipse -> CShort -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTEllipse.h TEllipse_SetLineStyle" c_tellipse_setlinestyle-               :: Ptr RawTEllipse -> CInt -> IO ()+               :: Ptr RawTEllipse -> CShort -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTEllipse.h TEllipse_SetLineWidth" c_tellipse_setlinewidth-               :: Ptr RawTEllipse -> CInt -> IO ()+               :: Ptr RawTEllipse -> CShort -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTEllipse.h TEllipse_SetFillColor" c_tellipse_setfillcolor                :: Ptr RawTEllipse -> CInt -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTEllipse.h TEllipse_SetFillStyle" c_tellipse_setfillstyle                :: Ptr RawTEllipse -> CInt -> IO () -foreign import ccall safe "HROOTGrafTEllipse.h TEllipse_delete"-               c_tellipse_delete :: Ptr RawTEllipse -> IO ()+foreign import ccall interruptible+               "HROOTGrafTEllipse.h TEllipse_delete" c_tellipse_delete ::+               Ptr RawTEllipse -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTEllipse.h TEllipse_newTEllipse" c_tellipse_newtellipse                ::                CDouble ->
src/HROOT/Graf/TEllipse/Implementation.hs view
@@ -1,17 +1,26 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances,   ForeignFunctionInterface, IncoherentInstances,-  MultiParamTypeClasses, OverlappingInstances, TypeFamilies,-  TypeSynonymInstances #-}+  MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+  TypeFamilies, TypeSynonymInstances #-} module HROOT.Graf.TEllipse.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Graf.TEllipse.RawType import HROOT.Graf.TEllipse.FFI import HROOT.Graf.TEllipse.Interface import HROOT.Graf.TEllipse.Cast+import HROOT.Graf.TEllipse.RawType+import HROOT.Graf.TEllipse.Cast+import HROOT.Graf.TEllipse.Interface import HROOT.Core.TClass.RawType import HROOT.Core.TClass.Cast import HROOT.Core.TClass.Interface@@ -24,13 +33,14 @@ import HROOT.Core.TAttFill.RawType import HROOT.Core.TAttFill.Cast import HROOT.Core.TAttFill.Interface-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Cast-import HROOT.Core.Deletable.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITEllipse TEllipse+instance () => ITEllipse (TEllipse) where -instance ITObject TEllipse where+instance () => ITObject (TEllipse) where+        clear = xform1 c_tellipse_clear         draw = xform1 c_tellipse_draw         findObject = xform1 c_tellipse_findobject         getName = xform0 c_tellipse_getname@@ -39,8 +49,9 @@         printObj = xform1 c_tellipse_printobj         saveAs = xform2 c_tellipse_saveas         write = xform3 c_tellipse_write+        write_ = xform0 c_tellipse_write_ -instance ITAttLine TEllipse where+instance () => ITAttLine (TEllipse) where         getLineColor = xform0 c_tellipse_getlinecolor         getLineStyle = xform0 c_tellipse_getlinestyle         getLineWidth = xform0 c_tellipse_getlinewidth@@ -50,14 +61,15 @@         setLineStyle = xform1 c_tellipse_setlinestyle         setLineWidth = xform1 c_tellipse_setlinewidth -instance ITAttFill TEllipse where+instance () => ITAttFill (TEllipse) where         setFillColor = xform1 c_tellipse_setfillcolor         setFillStyle = xform1 c_tellipse_setfillstyle -instance IDeletable TEllipse where+instance () => IDeletable (TEllipse) where         delete = xform0 c_tellipse_delete  newTEllipse ::+              () =>               CDouble ->                 CDouble ->                   CDouble -> CDouble -> CDouble -> CDouble -> CDouble -> IO TEllipse
src/HROOT/Graf/TEllipse/Interface.hs view
@@ -4,6 +4,7 @@   TypeSynonymInstances #-} module HROOT.Graf.TEllipse.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast@@ -12,7 +13,7 @@ import HROOT.Core.TAttLine.Interface import HROOT.Core.TAttFill.Interface -class (ITObject a, ITAttLine a, ITAttFill a) => ITEllipse a+class (ITObject a, ITAttLine a, ITAttFill a) => ITEllipse a where  upcastTEllipse :: forall a . (FPtr a, ITEllipse a) => a -> TEllipse upcastTEllipse h
src/HROOT/Graf/TEllipse/RawType.hs view
@@ -8,9 +8,9 @@ data RawTEllipse  newtype TEllipse = TEllipse (Ptr RawTEllipse)-                 deriving (Eq, Ord, Show)+                     deriving (Eq, Ord, Show) -instance FPtr TEllipse where+instance () => FPtr (TEllipse) where         type Raw TEllipse = RawTEllipse         get_fptr (TEllipse ptr) = ptr         cast_fptr_to_obj = TEllipse
src/HROOT/Graf/TGaxis/Cast.hs view
@@ -8,10 +8,10 @@ import HROOT.Graf.TGaxis.RawType import HROOT.Graf.TGaxis.Interface -instance (ITGaxis a, FPtr a) => Castable a (Ptr RawTGaxis) where+instance (ITGaxis a, FPtr a) => Castable (a) (Ptr RawTGaxis) where         cast x f = f (castPtr (get_fptr x))         uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TGaxis (Ptr RawTGaxis) where+instance () => Castable (TGaxis) (Ptr RawTGaxis) where         cast x f = f (castPtr (get_fptr x))         uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Graf/TGaxis/FFI.hsc view
@@ -1,139 +1,171 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Graf.TGaxis.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Graf.TGaxis.RawType+import HROOT.Graf.TGaxis.RawType import HROOT.Graf.TLine.RawType import HROOT.Core.TObject.RawType import HROOT.Core.TClass.RawType -foreign import ccall safe "HROOTGrafTGaxis.h TGaxis_DrawLine"-               c_tgaxis_drawline ::+foreign import ccall interruptible+               "HROOTGrafTGaxis.h TGaxis_DrawLine" c_tgaxis_drawline ::                Ptr RawTGaxis ->                  CDouble -> CDouble -> CDouble -> CDouble -> IO (Ptr RawTLine) -foreign import ccall safe "HROOTGrafTGaxis.h TGaxis_DrawLineNDC"-               c_tgaxis_drawlinendc ::+foreign import ccall interruptible+               "HROOTGrafTGaxis.h TGaxis_DrawLineNDC" c_tgaxis_drawlinendc ::                Ptr RawTGaxis ->                  CDouble -> CDouble -> CDouble -> CDouble -> IO (Ptr RawTLine) -foreign import ccall safe "HROOTGrafTGaxis.h TGaxis_PaintLine"-               c_tgaxis_paintline ::+foreign import ccall interruptible+               "HROOTGrafTGaxis.h TGaxis_PaintLine" c_tgaxis_paintline ::                Ptr RawTGaxis -> CDouble -> CDouble -> CDouble -> CDouble -> IO () -foreign import ccall safe "HROOTGrafTGaxis.h TGaxis_PaintLineNDC"-               c_tgaxis_paintlinendc ::+foreign import ccall interruptible+               "HROOTGrafTGaxis.h TGaxis_PaintLineNDC" c_tgaxis_paintlinendc ::                Ptr RawTGaxis -> CDouble -> CDouble -> CDouble -> CDouble -> IO () -foreign import ccall safe "HROOTGrafTGaxis.h TGaxis_SetX1"+foreign import ccall interruptible "HROOTGrafTGaxis.h TGaxis_SetX1"                c_tgaxis_setx1 :: Ptr RawTGaxis -> CDouble -> IO () -foreign import ccall safe "HROOTGrafTGaxis.h TGaxis_SetX2"+foreign import ccall interruptible "HROOTGrafTGaxis.h TGaxis_SetX2"                c_tgaxis_setx2 :: Ptr RawTGaxis -> CDouble -> IO () -foreign import ccall safe "HROOTGrafTGaxis.h TGaxis_SetY1"+foreign import ccall interruptible "HROOTGrafTGaxis.h TGaxis_SetY1"                c_tgaxis_sety1 :: Ptr RawTGaxis -> CDouble -> IO () -foreign import ccall safe "HROOTGrafTGaxis.h TGaxis_SetY2"+foreign import ccall interruptible "HROOTGrafTGaxis.h TGaxis_SetY2"                c_tgaxis_sety2 :: Ptr RawTGaxis -> CDouble -> IO () -foreign import ccall safe "HROOTGrafTGaxis.h TGaxis_GetTextAlign"-               c_tgaxis_gettextalign :: Ptr RawTGaxis -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTGaxis.h TGaxis_GetTextAlign" c_tgaxis_gettextalign ::+               Ptr RawTGaxis -> IO CShort -foreign import ccall safe "HROOTGrafTGaxis.h TGaxis_GetTextAngle"-               c_tgaxis_gettextangle :: Ptr RawTGaxis -> IO CDouble+foreign import ccall interruptible+               "HROOTGrafTGaxis.h TGaxis_GetTextAngle" c_tgaxis_gettextangle ::+               Ptr RawTGaxis -> IO CFloat -foreign import ccall safe "HROOTGrafTGaxis.h TGaxis_GetTextColor"-               c_tgaxis_gettextcolor :: Ptr RawTGaxis -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTGaxis.h TGaxis_GetTextColor" c_tgaxis_gettextcolor ::+               Ptr RawTGaxis -> IO CShort -foreign import ccall safe "HROOTGrafTGaxis.h TGaxis_GetTextFont"-               c_tgaxis_gettextfont :: Ptr RawTGaxis -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTGaxis.h TGaxis_GetTextFont" c_tgaxis_gettextfont ::+               Ptr RawTGaxis -> IO CShort -foreign import ccall safe "HROOTGrafTGaxis.h TGaxis_GetTextSize"-               c_tgaxis_gettextsize :: Ptr RawTGaxis -> IO CDouble+foreign import ccall interruptible+               "HROOTGrafTGaxis.h TGaxis_GetTextSize" c_tgaxis_gettextsize ::+               Ptr RawTGaxis -> IO CFloat -foreign import ccall safe "HROOTGrafTGaxis.h TGaxis_ResetAttText"-               c_tgaxis_resetatttext :: Ptr RawTGaxis -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTGaxis.h TGaxis_ResetAttText" c_tgaxis_resetatttext ::+               Ptr RawTGaxis -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGaxis.h TGaxis_SetTextAttributes"                c_tgaxis_settextattributes :: Ptr RawTGaxis -> IO () -foreign import ccall safe "HROOTGrafTGaxis.h TGaxis_SetTextAlign"-               c_tgaxis_settextalign :: Ptr RawTGaxis -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTGaxis.h TGaxis_SetTextAlign" c_tgaxis_settextalign ::+               Ptr RawTGaxis -> CShort -> IO () -foreign import ccall safe "HROOTGrafTGaxis.h TGaxis_SetTextAngle"-               c_tgaxis_settextangle :: Ptr RawTGaxis -> CDouble -> IO ()+foreign import ccall interruptible+               "HROOTGrafTGaxis.h TGaxis_SetTextAngle" c_tgaxis_settextangle ::+               Ptr RawTGaxis -> CFloat -> IO () -foreign import ccall safe "HROOTGrafTGaxis.h TGaxis_SetTextColor"-               c_tgaxis_settextcolor :: Ptr RawTGaxis -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTGaxis.h TGaxis_SetTextColor" c_tgaxis_settextcolor ::+               Ptr RawTGaxis -> CInt -> IO () -foreign import ccall safe "HROOTGrafTGaxis.h TGaxis_SetTextFont"-               c_tgaxis_settextfont :: Ptr RawTGaxis -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTGaxis.h TGaxis_SetTextFont" c_tgaxis_settextfont ::+               Ptr RawTGaxis -> CShort -> IO () -foreign import ccall safe "HROOTGrafTGaxis.h TGaxis_SetTextSize"-               c_tgaxis_settextsize :: Ptr RawTGaxis -> CDouble -> IO ()+foreign import ccall interruptible+               "HROOTGrafTGaxis.h TGaxis_SetTextSize" c_tgaxis_settextsize ::+               Ptr RawTGaxis -> CFloat -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGaxis.h TGaxis_SetTextSizePixels"                c_tgaxis_settextsizepixels :: Ptr RawTGaxis -> CInt -> IO () -foreign import ccall safe "HROOTGrafTGaxis.h TGaxis_Draw"+foreign import ccall interruptible "HROOTGrafTGaxis.h TGaxis_Clear"+               c_tgaxis_clear :: Ptr RawTGaxis -> CString -> IO ()++foreign import ccall interruptible "HROOTGrafTGaxis.h TGaxis_Draw"                c_tgaxis_draw :: Ptr RawTGaxis -> CString -> IO () -foreign import ccall safe "HROOTGrafTGaxis.h TGaxis_FindObject"-               c_tgaxis_findobject ::+foreign import ccall interruptible+               "HROOTGrafTGaxis.h TGaxis_FindObject" c_tgaxis_findobject ::                Ptr RawTGaxis -> CString -> IO (Ptr RawTObject) -foreign import ccall safe "HROOTGrafTGaxis.h TGaxis_GetName"-               c_tgaxis_getname :: Ptr RawTGaxis -> IO CString+foreign import ccall interruptible+               "HROOTGrafTGaxis.h TGaxis_GetName" c_tgaxis_getname ::+               Ptr RawTGaxis -> IO CString -foreign import ccall safe "HROOTGrafTGaxis.h TGaxis_IsA"+foreign import ccall interruptible "HROOTGrafTGaxis.h TGaxis_IsA"                c_tgaxis_isa :: Ptr RawTGaxis -> IO (Ptr RawTClass) -foreign import ccall safe "HROOTGrafTGaxis.h TGaxis_Paint"+foreign import ccall interruptible "HROOTGrafTGaxis.h TGaxis_Paint"                c_tgaxis_paint :: Ptr RawTGaxis -> CString -> IO () -foreign import ccall safe "HROOTGrafTGaxis.h TGaxis_printObj"-               c_tgaxis_printobj :: Ptr RawTGaxis -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTGaxis.h TGaxis_printObj" c_tgaxis_printobj ::+               Ptr RawTGaxis -> CString -> IO () -foreign import ccall safe "HROOTGrafTGaxis.h TGaxis_SaveAs"-               c_tgaxis_saveas :: Ptr RawTGaxis -> CString -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTGaxis.h TGaxis_SaveAs" c_tgaxis_saveas ::+               Ptr RawTGaxis -> CString -> CString -> IO () -foreign import ccall safe "HROOTGrafTGaxis.h TGaxis_Write"+foreign import ccall interruptible "HROOTGrafTGaxis.h TGaxis_Write"                c_tgaxis_write ::                Ptr RawTGaxis -> CString -> CInt -> CInt -> IO CInt -foreign import ccall safe "HROOTGrafTGaxis.h TGaxis_GetLineColor"-               c_tgaxis_getlinecolor :: Ptr RawTGaxis -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTGaxis.h TGaxis_Write_" c_tgaxis_write_ ::+               Ptr RawTGaxis -> IO CInt -foreign import ccall safe "HROOTGrafTGaxis.h TGaxis_GetLineStyle"-               c_tgaxis_getlinestyle :: Ptr RawTGaxis -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTGaxis.h TGaxis_GetLineColor" c_tgaxis_getlinecolor ::+               Ptr RawTGaxis -> IO CShort -foreign import ccall safe "HROOTGrafTGaxis.h TGaxis_GetLineWidth"-               c_tgaxis_getlinewidth :: Ptr RawTGaxis -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTGaxis.h TGaxis_GetLineStyle" c_tgaxis_getlinestyle ::+               Ptr RawTGaxis -> IO CShort -foreign import ccall safe "HROOTGrafTGaxis.h TGaxis_ResetAttLine"-               c_tgaxis_resetattline :: Ptr RawTGaxis -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTGaxis.h TGaxis_GetLineWidth" c_tgaxis_getlinewidth ::+               Ptr RawTGaxis -> IO CShort -foreign import ccall safe+foreign import ccall interruptible+               "HROOTGrafTGaxis.h TGaxis_ResetAttLine" c_tgaxis_resetattline ::+               Ptr RawTGaxis -> CString -> IO ()++foreign import ccall interruptible                "HROOTGrafTGaxis.h TGaxis_SetLineAttributes"                c_tgaxis_setlineattributes :: Ptr RawTGaxis -> IO () -foreign import ccall safe "HROOTGrafTGaxis.h TGaxis_SetLineColor"-               c_tgaxis_setlinecolor :: Ptr RawTGaxis -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTGaxis.h TGaxis_SetLineColor" c_tgaxis_setlinecolor ::+               Ptr RawTGaxis -> CShort -> IO () -foreign import ccall safe "HROOTGrafTGaxis.h TGaxis_SetLineStyle"-               c_tgaxis_setlinestyle :: Ptr RawTGaxis -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTGaxis.h TGaxis_SetLineStyle" c_tgaxis_setlinestyle ::+               Ptr RawTGaxis -> CShort -> IO () -foreign import ccall safe "HROOTGrafTGaxis.h TGaxis_SetLineWidth"-               c_tgaxis_setlinewidth :: Ptr RawTGaxis -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTGaxis.h TGaxis_SetLineWidth" c_tgaxis_setlinewidth ::+               Ptr RawTGaxis -> CShort -> IO () -foreign import ccall safe "HROOTGrafTGaxis.h TGaxis_delete"-               c_tgaxis_delete :: Ptr RawTGaxis -> IO ()+foreign import ccall interruptible+               "HROOTGrafTGaxis.h TGaxis_delete" c_tgaxis_delete ::+               Ptr RawTGaxis -> IO () -foreign import ccall safe "HROOTGrafTGaxis.h TGaxis_newTGaxis"-               c_tgaxis_newtgaxis ::+foreign import ccall interruptible+               "HROOTGrafTGaxis.h TGaxis_newTGaxis" c_tgaxis_newtgaxis ::                CDouble ->                  CDouble ->                    CDouble ->
src/HROOT/Graf/TGaxis/Implementation.hs view
@@ -1,17 +1,26 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances,   ForeignFunctionInterface, IncoherentInstances,-  MultiParamTypeClasses, OverlappingInstances, TypeFamilies,-  TypeSynonymInstances #-}+  MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+  TypeFamilies, TypeSynonymInstances #-} module HROOT.Graf.TGaxis.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Graf.TGaxis.RawType import HROOT.Graf.TGaxis.FFI import HROOT.Graf.TGaxis.Interface import HROOT.Graf.TGaxis.Cast+import HROOT.Graf.TGaxis.RawType+import HROOT.Graf.TGaxis.Cast+import HROOT.Graf.TGaxis.Interface import HROOT.Core.TClass.RawType import HROOT.Core.TClass.Cast import HROOT.Core.TClass.Interface@@ -27,13 +36,13 @@ import HROOT.Core.TAttLine.RawType import HROOT.Core.TAttLine.Cast import HROOT.Core.TAttLine.Interface-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Cast-import HROOT.Core.Deletable.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITGaxis TGaxis+instance () => ITGaxis (TGaxis) where -instance ITLine TGaxis where+instance () => ITLine (TGaxis) where         drawLine = xform4 c_tgaxis_drawline         drawLineNDC = xform4 c_tgaxis_drawlinendc         paintLine = xform4 c_tgaxis_paintline@@ -43,7 +52,7 @@         setY1 = xform1 c_tgaxis_sety1         setY2 = xform1 c_tgaxis_sety2 -instance ITAttText TGaxis where+instance () => ITAttText (TGaxis) where         getTextAlign = xform0 c_tgaxis_gettextalign         getTextAngle = xform0 c_tgaxis_gettextangle         getTextColor = xform0 c_tgaxis_gettextcolor@@ -58,7 +67,8 @@         setTextSize = xform1 c_tgaxis_settextsize         setTextSizePixels = xform1 c_tgaxis_settextsizepixels -instance ITObject TGaxis where+instance () => ITObject (TGaxis) where+        clear = xform1 c_tgaxis_clear         draw = xform1 c_tgaxis_draw         findObject = xform1 c_tgaxis_findobject         getName = xform0 c_tgaxis_getname@@ -67,8 +77,9 @@         printObj = xform1 c_tgaxis_printobj         saveAs = xform2 c_tgaxis_saveas         write = xform3 c_tgaxis_write+        write_ = xform0 c_tgaxis_write_ -instance ITAttLine TGaxis where+instance () => ITAttLine (TGaxis) where         getLineColor = xform0 c_tgaxis_getlinecolor         getLineStyle = xform0 c_tgaxis_getlinestyle         getLineWidth = xform0 c_tgaxis_getlinewidth@@ -78,11 +89,11 @@         setLineStyle = xform1 c_tgaxis_setlinestyle         setLineWidth = xform1 c_tgaxis_setlinewidth -instance IDeletable TGaxis where+instance () => IDeletable (TGaxis) where         delete = xform0 c_tgaxis_delete  newTGaxis ::-            Castable c0 CString =>+            (Castable c0 CString) =>             CDouble ->               CDouble ->                 CDouble ->
src/HROOT/Graf/TGaxis/Interface.hs view
@@ -4,6 +4,7 @@   TypeSynonymInstances #-} module HROOT.Graf.TGaxis.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast@@ -11,7 +12,7 @@ import HROOT.Graf.TLine.Interface import HROOT.Core.TAttText.Interface -class (ITLine a, ITAttText a) => ITGaxis a+class (ITLine a, ITAttText a) => ITGaxis a where  upcastTGaxis :: forall a . (FPtr a, ITGaxis a) => a -> TGaxis upcastTGaxis h
src/HROOT/Graf/TGaxis/RawType.hs view
@@ -8,9 +8,9 @@ data RawTGaxis  newtype TGaxis = TGaxis (Ptr RawTGaxis)-               deriving (Eq, Ord, Show)+                   deriving (Eq, Ord, Show) -instance FPtr TGaxis where+instance () => FPtr (TGaxis) where         type Raw TGaxis = RawTGaxis         get_fptr (TGaxis ptr) = ptr         cast_fptr_to_obj = TGaxis
src/HROOT/Graf/TGraphPolar/Cast.hs view
@@ -8,11 +8,12 @@ import HROOT.Graf.TGraphPolar.RawType import HROOT.Graf.TGraphPolar.Interface -instance (ITGraphPolar a, FPtr a) => Castable a-         (Ptr RawTGraphPolar) where+instance (ITGraphPolar a, FPtr a) =>+         Castable (a) (Ptr RawTGraphPolar)+         where         cast x f = f (castPtr (get_fptr x))         uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TGraphPolar (Ptr RawTGraphPolar) where+instance () => Castable (TGraphPolar) (Ptr RawTGraphPolar) where         cast x f = f (castPtr (get_fptr x))         uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Graf/TGraphPolar/FFI.hsc view
@@ -1,290 +1,312 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Graf.TGraphPolar.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Graf.TGraphPolar.RawType+import HROOT.Graf.TGraphPolar.RawType import HROOT.Hist.TF1.RawType import HROOT.Hist.TH1F.RawType import HROOT.Hist.TAxis.RawType import HROOT.Core.TObject.RawType import HROOT.Core.TClass.RawType -foreign import ccall safe+foreign import ccall interruptible+               "HROOTGrafTGraphPolar.h TGraphPolar_SetPointError"+               c_tgraphpolar_setpointerror ::+               Ptr RawTGraphPolar -> CInt -> CDouble -> CDouble -> IO ()++foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_Apply" c_tgraphpolar_apply ::                Ptr RawTGraphPolar -> Ptr RawTF1 -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_Chisquare"                c_tgraphpolar_chisquare ::                Ptr RawTGraphPolar -> Ptr RawTF1 -> IO CDouble -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_DrawGraph"                c_tgraphpolar_drawgraph ::                Ptr RawTGraphPolar ->-                 CInt -> (Ptr CDouble) -> (Ptr CDouble) -> CString -> IO ()+                 CInt -> Ptr CDouble -> Ptr CDouble -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_drawPanelTGraph"                c_tgraphpolar_drawpaneltgraph :: Ptr RawTGraphPolar -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_Expand" c_tgraphpolar_expand ::                Ptr RawTGraphPolar -> CInt -> CInt -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_FitPanelTGraph"                c_tgraphpolar_fitpaneltgraph :: Ptr RawTGraphPolar -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_getCorrelationFactorTGraph"                c_tgraphpolar_getcorrelationfactortgraph ::                Ptr RawTGraphPolar -> IO CDouble -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_getCovarianceTGraph"                c_tgraphpolar_getcovariancetgraph ::                Ptr RawTGraphPolar -> IO CDouble -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_getMeanTGraph"                c_tgraphpolar_getmeantgraph ::                Ptr RawTGraphPolar -> CInt -> IO CDouble -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_getRMSTGraph"                c_tgraphpolar_getrmstgraph ::                Ptr RawTGraphPolar -> CInt -> IO CDouble -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_GetErrorX"                c_tgraphpolar_geterrorx :: Ptr RawTGraphPolar -> CInt -> IO CDouble -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_GetErrorY"                c_tgraphpolar_geterrory :: Ptr RawTGraphPolar -> CInt -> IO CDouble -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_GetErrorXhigh"                c_tgraphpolar_geterrorxhigh ::                Ptr RawTGraphPolar -> CInt -> IO CDouble -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_GetErrorXlow"                c_tgraphpolar_geterrorxlow ::                Ptr RawTGraphPolar -> CInt -> IO CDouble -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_GetErrorYhigh"                c_tgraphpolar_geterroryhigh ::                Ptr RawTGraphPolar -> CInt -> IO CDouble -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_GetErrorYlow"                c_tgraphpolar_geterrorylow ::                Ptr RawTGraphPolar -> CInt -> IO CDouble -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_InitExpo"                c_tgraphpolar_initexpo ::                Ptr RawTGraphPolar -> CDouble -> CDouble -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_InitGaus"                c_tgraphpolar_initgaus ::                Ptr RawTGraphPolar -> CDouble -> CDouble -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_InitPolynom"                c_tgraphpolar_initpolynom ::                Ptr RawTGraphPolar -> CDouble -> CDouble -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_InsertPoint"                c_tgraphpolar_insertpoint :: Ptr RawTGraphPolar -> IO CInt -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_integralTGraph"                c_tgraphpolar_integraltgraph ::                Ptr RawTGraphPolar -> CInt -> CInt -> IO CDouble -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_IsEditable"-               c_tgraphpolar_iseditable :: Ptr RawTGraphPolar -> IO CInt+               c_tgraphpolar_iseditable :: Ptr RawTGraphPolar -> IO CBool -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_isInsideTGraph"                c_tgraphpolar_isinsidetgraph ::                Ptr RawTGraphPolar -> CDouble -> CDouble -> IO CInt -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_LeastSquareFit"                c_tgraphpolar_leastsquarefit ::                Ptr RawTGraphPolar ->-                 CInt -> (Ptr CDouble) -> CDouble -> CDouble -> IO ()+                 CInt -> Ptr CDouble -> CDouble -> CDouble -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_PaintStats"                c_tgraphpolar_paintstats ::                Ptr RawTGraphPolar -> Ptr RawTF1 -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_RemovePoint"                c_tgraphpolar_removepoint :: Ptr RawTGraphPolar -> CInt -> IO CInt -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_SetEditable"-               c_tgraphpolar_seteditable :: Ptr RawTGraphPolar -> CInt -> IO ()+               c_tgraphpolar_seteditable :: Ptr RawTGraphPolar -> CBool -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_SetHistogram"                c_tgraphpolar_sethistogram ::                Ptr RawTGraphPolar -> Ptr RawTH1F -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_setMaximumTGraph"                c_tgraphpolar_setmaximumtgraph ::                Ptr RawTGraphPolar -> CDouble -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_setMinimumTGraph"                c_tgraphpolar_setminimumtgraph ::                Ptr RawTGraphPolar -> CDouble -> IO () -foreign import ccall safe "HROOTGrafTGraphPolar.h TGraphPolar_Set"-               c_tgraphpolar_set :: Ptr RawTGraphPolar -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTGraphPolar.h TGraphPolar_Set" c_tgraphpolar_set ::+               Ptr RawTGraphPolar -> CInt -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_SetPoint"                c_tgraphpolar_setpoint ::                Ptr RawTGraphPolar -> CInt -> CDouble -> CDouble -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_SetName" c_tgraphpolar_setname                :: Ptr RawTGraphPolar -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_SetNameTitle"                c_tgraphpolar_setnametitle ::                Ptr RawTGraphPolar -> CString -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_SetTitle"                c_tgraphpolar_settitle :: Ptr RawTGraphPolar -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_GetLineColor"-               c_tgraphpolar_getlinecolor :: Ptr RawTGraphPolar -> IO CInt+               c_tgraphpolar_getlinecolor :: Ptr RawTGraphPolar -> IO CShort -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_GetLineStyle"-               c_tgraphpolar_getlinestyle :: Ptr RawTGraphPolar -> IO CInt+               c_tgraphpolar_getlinestyle :: Ptr RawTGraphPolar -> IO CShort -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_GetLineWidth"-               c_tgraphpolar_getlinewidth :: Ptr RawTGraphPolar -> IO CInt+               c_tgraphpolar_getlinewidth :: Ptr RawTGraphPolar -> IO CShort -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_ResetAttLine"                c_tgraphpolar_resetattline ::                Ptr RawTGraphPolar -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_SetLineAttributes"                c_tgraphpolar_setlineattributes :: Ptr RawTGraphPolar -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_SetLineColor"-               c_tgraphpolar_setlinecolor :: Ptr RawTGraphPolar -> CInt -> IO ()+               c_tgraphpolar_setlinecolor :: Ptr RawTGraphPolar -> CShort -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_SetLineStyle"-               c_tgraphpolar_setlinestyle :: Ptr RawTGraphPolar -> CInt -> IO ()+               c_tgraphpolar_setlinestyle :: Ptr RawTGraphPolar -> CShort -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_SetLineWidth"-               c_tgraphpolar_setlinewidth :: Ptr RawTGraphPolar -> CInt -> IO ()+               c_tgraphpolar_setlinewidth :: Ptr RawTGraphPolar -> CShort -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_SetFillColor"                c_tgraphpolar_setfillcolor :: Ptr RawTGraphPolar -> CInt -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_SetFillStyle"                c_tgraphpolar_setfillstyle :: Ptr RawTGraphPolar -> CInt -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_GetMarkerColor"-               c_tgraphpolar_getmarkercolor :: Ptr RawTGraphPolar -> IO CInt+               c_tgraphpolar_getmarkercolor :: Ptr RawTGraphPolar -> IO CShort -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_GetMarkerStyle"-               c_tgraphpolar_getmarkerstyle :: Ptr RawTGraphPolar -> IO CInt+               c_tgraphpolar_getmarkerstyle :: Ptr RawTGraphPolar -> IO CShort -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_GetMarkerSize"-               c_tgraphpolar_getmarkersize :: Ptr RawTGraphPolar -> IO CDouble+               c_tgraphpolar_getmarkersize :: Ptr RawTGraphPolar -> IO CFloat -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_ResetAttMarker"                c_tgraphpolar_resetattmarker ::                Ptr RawTGraphPolar -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_SetMarkerAttributes"                c_tgraphpolar_setmarkerattributes :: Ptr RawTGraphPolar -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_SetMarkerColor"-               c_tgraphpolar_setmarkercolor :: Ptr RawTGraphPolar -> CInt -> IO ()+               c_tgraphpolar_setmarkercolor ::+               Ptr RawTGraphPolar -> CShort -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_SetMarkerStyle"-               c_tgraphpolar_setmarkerstyle :: Ptr RawTGraphPolar -> CInt -> IO ()+               c_tgraphpolar_setmarkerstyle ::+               Ptr RawTGraphPolar -> CShort -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_SetMarkerSize"-               c_tgraphpolar_setmarkersize :: Ptr RawTGraphPolar -> CInt -> IO ()+               c_tgraphpolar_setmarkersize ::+               Ptr RawTGraphPolar -> CShort -> IO () -foreign import ccall safe "HROOTGrafTGraphPolar.h TGraphPolar_Draw"-               c_tgraphpolar_draw :: Ptr RawTGraphPolar -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTGraphPolar.h TGraphPolar_Clear" c_tgraphpolar_clear ::+               Ptr RawTGraphPolar -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible+               "HROOTGrafTGraphPolar.h TGraphPolar_Draw" c_tgraphpolar_draw ::+               Ptr RawTGraphPolar -> CString -> IO ()++foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_FindObject"                c_tgraphpolar_findobject ::                Ptr RawTGraphPolar -> CString -> IO (Ptr RawTObject) -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_GetName" c_tgraphpolar_getname                :: Ptr RawTGraphPolar -> IO CString -foreign import ccall safe "HROOTGrafTGraphPolar.h TGraphPolar_IsA"-               c_tgraphpolar_isa :: Ptr RawTGraphPolar -> IO (Ptr RawTClass)+foreign import ccall interruptible+               "HROOTGrafTGraphPolar.h TGraphPolar_IsA" c_tgraphpolar_isa ::+               Ptr RawTGraphPolar -> IO (Ptr RawTClass) -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_Paint" c_tgraphpolar_paint ::                Ptr RawTGraphPolar -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_printObj"                c_tgraphpolar_printobj :: Ptr RawTGraphPolar -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_SaveAs" c_tgraphpolar_saveas ::                Ptr RawTGraphPolar -> CString -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_Write" c_tgraphpolar_write ::                Ptr RawTGraphPolar -> CString -> CInt -> CInt -> IO CInt -foreign import ccall safe+foreign import ccall interruptible+               "HROOTGrafTGraphPolar.h TGraphPolar_Write_" c_tgraphpolar_write_ ::+               Ptr RawTGraphPolar -> IO CInt++foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_delete" c_tgraphpolar_delete ::                Ptr RawTGraphPolar -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphPolar.h TGraphPolar_newTGraphPolar"                c_tgraphpolar_newtgraphpolar ::                CInt ->-                 (Ptr CDouble) ->-                   (Ptr CDouble) ->-                     (Ptr CDouble) -> (Ptr CDouble) -> IO (Ptr RawTGraphPolar)+                 Ptr CDouble ->+                   Ptr CDouble ->+                     Ptr CDouble -> Ptr CDouble -> IO (Ptr RawTGraphPolar)
src/HROOT/Graf/TGraphPolar/Implementation.hs view
@@ -1,17 +1,26 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances,   ForeignFunctionInterface, IncoherentInstances,-  MultiParamTypeClasses, OverlappingInstances, TypeFamilies,-  TypeSynonymInstances #-}+  MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+  TypeFamilies, TypeSynonymInstances #-} module HROOT.Graf.TGraphPolar.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Graf.TGraphPolar.RawType import HROOT.Graf.TGraphPolar.FFI import HROOT.Graf.TGraphPolar.Interface import HROOT.Graf.TGraphPolar.Cast+import HROOT.Graf.TGraphPolar.RawType+import HROOT.Graf.TGraphPolar.Cast+import HROOT.Graf.TGraphPolar.Interface import HROOT.Hist.TF1.RawType import HROOT.Hist.TF1.Cast import HROOT.Hist.TF1.Interface@@ -45,15 +54,16 @@ import HROOT.Core.TObject.RawType import HROOT.Core.TObject.Cast import HROOT.Core.TObject.Interface-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Cast-import HROOT.Core.Deletable.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITGraphPolar TGraphPolar+instance () => ITGraphPolar (TGraphPolar) where -instance ITGraphErrors TGraphPolar+instance () => ITGraphErrors (TGraphPolar) where+        setPointError = xform3 c_tgraphpolar_setpointerror -instance ITGraph TGraphPolar where+instance () => ITGraph (TGraphPolar) where         apply = xform1 c_tgraphpolar_apply         chisquare = xform1 c_tgraphpolar_chisquare         drawGraph = xform4 c_tgraphpolar_drawgraph@@ -88,12 +98,12 @@         set = xform1 c_tgraphpolar_set         setPoint = xform3 c_tgraphpolar_setpoint -instance ITNamed TGraphPolar where+instance () => ITNamed (TGraphPolar) where         setName = xform1 c_tgraphpolar_setname         setNameTitle = xform2 c_tgraphpolar_setnametitle         setTitle = xform1 c_tgraphpolar_settitle -instance ITAttLine TGraphPolar where+instance () => ITAttLine (TGraphPolar) where         getLineColor = xform0 c_tgraphpolar_getlinecolor         getLineStyle = xform0 c_tgraphpolar_getlinestyle         getLineWidth = xform0 c_tgraphpolar_getlinewidth@@ -103,11 +113,11 @@         setLineStyle = xform1 c_tgraphpolar_setlinestyle         setLineWidth = xform1 c_tgraphpolar_setlinewidth -instance ITAttFill TGraphPolar where+instance () => ITAttFill (TGraphPolar) where         setFillColor = xform1 c_tgraphpolar_setfillcolor         setFillStyle = xform1 c_tgraphpolar_setfillstyle -instance ITAttMarker TGraphPolar where+instance () => ITAttMarker (TGraphPolar) where         getMarkerColor = xform0 c_tgraphpolar_getmarkercolor         getMarkerStyle = xform0 c_tgraphpolar_getmarkerstyle         getMarkerSize = xform0 c_tgraphpolar_getmarkersize@@ -117,7 +127,8 @@         setMarkerStyle = xform1 c_tgraphpolar_setmarkerstyle         setMarkerSize = xform1 c_tgraphpolar_setmarkersize -instance ITObject TGraphPolar where+instance () => ITObject (TGraphPolar) where+        clear = xform1 c_tgraphpolar_clear         draw = xform1 c_tgraphpolar_draw         findObject = xform1 c_tgraphpolar_findobject         getName = xform0 c_tgraphpolar_getname@@ -126,12 +137,14 @@         printObj = xform1 c_tgraphpolar_printobj         saveAs = xform2 c_tgraphpolar_saveas         write = xform3 c_tgraphpolar_write+        write_ = xform0 c_tgraphpolar_write_ -instance IDeletable TGraphPolar where+instance () => IDeletable (TGraphPolar) where         delete = xform0 c_tgraphpolar_delete  newTGraphPolar ::+                 () =>                  CInt ->-                   (Ptr CDouble) ->-                     (Ptr CDouble) -> (Ptr CDouble) -> (Ptr CDouble) -> IO TGraphPolar+                   Ptr CDouble ->+                     Ptr CDouble -> Ptr CDouble -> Ptr CDouble -> IO TGraphPolar newTGraphPolar = xform4 c_tgraphpolar_newtgraphpolar
src/HROOT/Graf/TGraphPolar/Interface.hs view
@@ -4,13 +4,14 @@   TypeSynonymInstances #-} module HROOT.Graf.TGraphPolar.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Graf.TGraphPolar.RawType import HROOT.Hist.TGraphErrors.Interface -class ITGraphErrors a => ITGraphPolar a+class (ITGraphErrors a) => ITGraphPolar a where  upcastTGraphPolar ::                   forall a . (FPtr a, ITGraphPolar a) => a -> TGraphPolar
src/HROOT/Graf/TGraphPolar/RawType.hs view
@@ -8,9 +8,9 @@ data RawTGraphPolar  newtype TGraphPolar = TGraphPolar (Ptr RawTGraphPolar)-                    deriving (Eq, Ord, Show)+                        deriving (Eq, Ord, Show) -instance FPtr TGraphPolar where+instance () => FPtr (TGraphPolar) where         type Raw TGraphPolar = RawTGraphPolar         get_fptr (TGraphPolar ptr) = ptr         cast_fptr_to_obj = TGraphPolar
src/HROOT/Graf/TGraphQQ/Cast.hs view
@@ -8,11 +8,11 @@ import HROOT.Graf.TGraphQQ.RawType import HROOT.Graf.TGraphQQ.Interface -instance (ITGraphQQ a, FPtr a) => Castable a (Ptr RawTGraphQQ)+instance (ITGraphQQ a, FPtr a) => Castable (a) (Ptr RawTGraphQQ)          where         cast x f = f (castPtr (get_fptr x))         uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TGraphQQ (Ptr RawTGraphQQ) where+instance () => Castable (TGraphQQ) (Ptr RawTGraphQQ) where         cast x f = f (castPtr (get_fptr x))         uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Graf/TGraphQQ/FFI.hsc view
@@ -1,253 +1,280 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Graf.TGraphQQ.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Graf.TGraphQQ.RawType+import HROOT.Graf.TGraphQQ.RawType import HROOT.Hist.TF1.RawType import HROOT.Hist.TH1F.RawType import HROOT.Hist.TAxis.RawType import HROOT.Core.TObject.RawType import HROOT.Core.TClass.RawType -foreign import ccall safe "HROOTGrafTGraphQQ.h TGraphQQ_Apply"-               c_tgraphqq_apply :: Ptr RawTGraphQQ -> Ptr RawTF1 -> IO ()+foreign import ccall interruptible+               "HROOTGrafTGraphQQ.h TGraphQQ_Apply" c_tgraphqq_apply ::+               Ptr RawTGraphQQ -> Ptr RawTF1 -> IO () -foreign import ccall safe "HROOTGrafTGraphQQ.h TGraphQQ_Chisquare"-               c_tgraphqq_chisquare :: Ptr RawTGraphQQ -> Ptr RawTF1 -> IO CDouble+foreign import ccall interruptible+               "HROOTGrafTGraphQQ.h TGraphQQ_Chisquare" c_tgraphqq_chisquare ::+               Ptr RawTGraphQQ -> Ptr RawTF1 -> IO CDouble -foreign import ccall safe "HROOTGrafTGraphQQ.h TGraphQQ_DrawGraph"-               c_tgraphqq_drawgraph ::+foreign import ccall interruptible+               "HROOTGrafTGraphQQ.h TGraphQQ_DrawGraph" c_tgraphqq_drawgraph ::                Ptr RawTGraphQQ ->-                 CInt -> (Ptr CDouble) -> (Ptr CDouble) -> CString -> IO ()+                 CInt -> Ptr CDouble -> Ptr CDouble -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_drawPanelTGraph"                c_tgraphqq_drawpaneltgraph :: Ptr RawTGraphQQ -> IO () -foreign import ccall safe "HROOTGrafTGraphQQ.h TGraphQQ_Expand"-               c_tgraphqq_expand :: Ptr RawTGraphQQ -> CInt -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTGraphQQ.h TGraphQQ_Expand" c_tgraphqq_expand ::+               Ptr RawTGraphQQ -> CInt -> CInt -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_FitPanelTGraph"                c_tgraphqq_fitpaneltgraph :: Ptr RawTGraphQQ -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_getCorrelationFactorTGraph"                c_tgraphqq_getcorrelationfactortgraph ::                Ptr RawTGraphQQ -> IO CDouble -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_getCovarianceTGraph"                c_tgraphqq_getcovariancetgraph :: Ptr RawTGraphQQ -> IO CDouble -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_getMeanTGraph"                c_tgraphqq_getmeantgraph :: Ptr RawTGraphQQ -> CInt -> IO CDouble -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_getRMSTGraph" c_tgraphqq_getrmstgraph                :: Ptr RawTGraphQQ -> CInt -> IO CDouble -foreign import ccall safe "HROOTGrafTGraphQQ.h TGraphQQ_GetErrorX"-               c_tgraphqq_geterrorx :: Ptr RawTGraphQQ -> CInt -> IO CDouble+foreign import ccall interruptible+               "HROOTGrafTGraphQQ.h TGraphQQ_GetErrorX" c_tgraphqq_geterrorx ::+               Ptr RawTGraphQQ -> CInt -> IO CDouble -foreign import ccall safe "HROOTGrafTGraphQQ.h TGraphQQ_GetErrorY"-               c_tgraphqq_geterrory :: Ptr RawTGraphQQ -> CInt -> IO CDouble+foreign import ccall interruptible+               "HROOTGrafTGraphQQ.h TGraphQQ_GetErrorY" c_tgraphqq_geterrory ::+               Ptr RawTGraphQQ -> CInt -> IO CDouble -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_GetErrorXhigh"                c_tgraphqq_geterrorxhigh :: Ptr RawTGraphQQ -> CInt -> IO CDouble -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_GetErrorXlow" c_tgraphqq_geterrorxlow                :: Ptr RawTGraphQQ -> CInt -> IO CDouble -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_GetErrorYhigh"                c_tgraphqq_geterroryhigh :: Ptr RawTGraphQQ -> CInt -> IO CDouble -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_GetErrorYlow" c_tgraphqq_geterrorylow                :: Ptr RawTGraphQQ -> CInt -> IO CDouble -foreign import ccall safe "HROOTGrafTGraphQQ.h TGraphQQ_InitExpo"-               c_tgraphqq_initexpo ::+foreign import ccall interruptible+               "HROOTGrafTGraphQQ.h TGraphQQ_InitExpo" c_tgraphqq_initexpo ::                Ptr RawTGraphQQ -> CDouble -> CDouble -> IO () -foreign import ccall safe "HROOTGrafTGraphQQ.h TGraphQQ_InitGaus"-               c_tgraphqq_initgaus ::+foreign import ccall interruptible+               "HROOTGrafTGraphQQ.h TGraphQQ_InitGaus" c_tgraphqq_initgaus ::                Ptr RawTGraphQQ -> CDouble -> CDouble -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_InitPolynom" c_tgraphqq_initpolynom                :: Ptr RawTGraphQQ -> CDouble -> CDouble -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_InsertPoint" c_tgraphqq_insertpoint                :: Ptr RawTGraphQQ -> IO CInt -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_integralTGraph"                c_tgraphqq_integraltgraph ::                Ptr RawTGraphQQ -> CInt -> CInt -> IO CDouble -foreign import ccall safe "HROOTGrafTGraphQQ.h TGraphQQ_IsEditable"-               c_tgraphqq_iseditable :: Ptr RawTGraphQQ -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTGraphQQ.h TGraphQQ_IsEditable" c_tgraphqq_iseditable ::+               Ptr RawTGraphQQ -> IO CBool -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_isInsideTGraph"                c_tgraphqq_isinsidetgraph ::                Ptr RawTGraphQQ -> CDouble -> CDouble -> IO CInt -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_LeastSquareFit"                c_tgraphqq_leastsquarefit ::                Ptr RawTGraphQQ ->-                 CInt -> (Ptr CDouble) -> CDouble -> CDouble -> IO ()+                 CInt -> Ptr CDouble -> CDouble -> CDouble -> IO () -foreign import ccall safe "HROOTGrafTGraphQQ.h TGraphQQ_PaintStats"-               c_tgraphqq_paintstats :: Ptr RawTGraphQQ -> Ptr RawTF1 -> IO ()+foreign import ccall interruptible+               "HROOTGrafTGraphQQ.h TGraphQQ_PaintStats" c_tgraphqq_paintstats ::+               Ptr RawTGraphQQ -> Ptr RawTF1 -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_RemovePoint" c_tgraphqq_removepoint                :: Ptr RawTGraphQQ -> CInt -> IO CInt -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_SetEditable" c_tgraphqq_seteditable-               :: Ptr RawTGraphQQ -> CInt -> IO ()+               :: Ptr RawTGraphQQ -> CBool -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_SetHistogram" c_tgraphqq_sethistogram                :: Ptr RawTGraphQQ -> Ptr RawTH1F -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_setMaximumTGraph"                c_tgraphqq_setmaximumtgraph :: Ptr RawTGraphQQ -> CDouble -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_setMinimumTGraph"                c_tgraphqq_setminimumtgraph :: Ptr RawTGraphQQ -> CDouble -> IO () -foreign import ccall safe "HROOTGrafTGraphQQ.h TGraphQQ_Set"-               c_tgraphqq_set :: Ptr RawTGraphQQ -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTGraphQQ.h TGraphQQ_Set" c_tgraphqq_set ::+               Ptr RawTGraphQQ -> CInt -> IO () -foreign import ccall safe "HROOTGrafTGraphQQ.h TGraphQQ_SetPoint"-               c_tgraphqq_setpoint ::+foreign import ccall interruptible+               "HROOTGrafTGraphQQ.h TGraphQQ_SetPoint" c_tgraphqq_setpoint ::                Ptr RawTGraphQQ -> CInt -> CDouble -> CDouble -> IO () -foreign import ccall safe "HROOTGrafTGraphQQ.h TGraphQQ_SetName"-               c_tgraphqq_setname :: Ptr RawTGraphQQ -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTGraphQQ.h TGraphQQ_SetName" c_tgraphqq_setname ::+               Ptr RawTGraphQQ -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_SetNameTitle" c_tgraphqq_setnametitle                :: Ptr RawTGraphQQ -> CString -> CString -> IO () -foreign import ccall safe "HROOTGrafTGraphQQ.h TGraphQQ_SetTitle"-               c_tgraphqq_settitle :: Ptr RawTGraphQQ -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTGraphQQ.h TGraphQQ_SetTitle" c_tgraphqq_settitle ::+               Ptr RawTGraphQQ -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_GetLineColor" c_tgraphqq_getlinecolor-               :: Ptr RawTGraphQQ -> IO CInt+               :: Ptr RawTGraphQQ -> IO CShort -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_GetLineStyle" c_tgraphqq_getlinestyle-               :: Ptr RawTGraphQQ -> IO CInt+               :: Ptr RawTGraphQQ -> IO CShort -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_GetLineWidth" c_tgraphqq_getlinewidth-               :: Ptr RawTGraphQQ -> IO CInt+               :: Ptr RawTGraphQQ -> IO CShort -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_ResetAttLine" c_tgraphqq_resetattline                :: Ptr RawTGraphQQ -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_SetLineAttributes"                c_tgraphqq_setlineattributes :: Ptr RawTGraphQQ -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_SetLineColor" c_tgraphqq_setlinecolor-               :: Ptr RawTGraphQQ -> CInt -> IO ()+               :: Ptr RawTGraphQQ -> CShort -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_SetLineStyle" c_tgraphqq_setlinestyle-               :: Ptr RawTGraphQQ -> CInt -> IO ()+               :: Ptr RawTGraphQQ -> CShort -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_SetLineWidth" c_tgraphqq_setlinewidth-               :: Ptr RawTGraphQQ -> CInt -> IO ()+               :: Ptr RawTGraphQQ -> CShort -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_SetFillColor" c_tgraphqq_setfillcolor                :: Ptr RawTGraphQQ -> CInt -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_SetFillStyle" c_tgraphqq_setfillstyle                :: Ptr RawTGraphQQ -> CInt -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_GetMarkerColor"-               c_tgraphqq_getmarkercolor :: Ptr RawTGraphQQ -> IO CInt+               c_tgraphqq_getmarkercolor :: Ptr RawTGraphQQ -> IO CShort -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_GetMarkerStyle"-               c_tgraphqq_getmarkerstyle :: Ptr RawTGraphQQ -> IO CInt+               c_tgraphqq_getmarkerstyle :: Ptr RawTGraphQQ -> IO CShort -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_GetMarkerSize"-               c_tgraphqq_getmarkersize :: Ptr RawTGraphQQ -> IO CDouble+               c_tgraphqq_getmarkersize :: Ptr RawTGraphQQ -> IO CFloat -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_ResetAttMarker"                c_tgraphqq_resetattmarker :: Ptr RawTGraphQQ -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_SetMarkerAttributes"                c_tgraphqq_setmarkerattributes :: Ptr RawTGraphQQ -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_SetMarkerColor"-               c_tgraphqq_setmarkercolor :: Ptr RawTGraphQQ -> CInt -> IO ()+               c_tgraphqq_setmarkercolor :: Ptr RawTGraphQQ -> CShort -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_SetMarkerStyle"-               c_tgraphqq_setmarkerstyle :: Ptr RawTGraphQQ -> CInt -> IO ()+               c_tgraphqq_setmarkerstyle :: Ptr RawTGraphQQ -> CShort -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_SetMarkerSize"-               c_tgraphqq_setmarkersize :: Ptr RawTGraphQQ -> CInt -> IO ()+               c_tgraphqq_setmarkersize :: Ptr RawTGraphQQ -> CShort -> IO () -foreign import ccall safe "HROOTGrafTGraphQQ.h TGraphQQ_Draw"-               c_tgraphqq_draw :: Ptr RawTGraphQQ -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTGraphQQ.h TGraphQQ_Clear" c_tgraphqq_clear ::+               Ptr RawTGraphQQ -> CString -> IO () -foreign import ccall safe "HROOTGrafTGraphQQ.h TGraphQQ_FindObject"-               c_tgraphqq_findobject ::+foreign import ccall interruptible+               "HROOTGrafTGraphQQ.h TGraphQQ_Draw" c_tgraphqq_draw ::+               Ptr RawTGraphQQ -> CString -> IO ()++foreign import ccall interruptible+               "HROOTGrafTGraphQQ.h TGraphQQ_FindObject" c_tgraphqq_findobject ::                Ptr RawTGraphQQ -> CString -> IO (Ptr RawTObject) -foreign import ccall safe "HROOTGrafTGraphQQ.h TGraphQQ_GetName"-               c_tgraphqq_getname :: Ptr RawTGraphQQ -> IO CString+foreign import ccall interruptible+               "HROOTGrafTGraphQQ.h TGraphQQ_GetName" c_tgraphqq_getname ::+               Ptr RawTGraphQQ -> IO CString -foreign import ccall safe "HROOTGrafTGraphQQ.h TGraphQQ_IsA"-               c_tgraphqq_isa :: Ptr RawTGraphQQ -> IO (Ptr RawTClass)+foreign import ccall interruptible+               "HROOTGrafTGraphQQ.h TGraphQQ_IsA" c_tgraphqq_isa ::+               Ptr RawTGraphQQ -> IO (Ptr RawTClass) -foreign import ccall safe "HROOTGrafTGraphQQ.h TGraphQQ_Paint"-               c_tgraphqq_paint :: Ptr RawTGraphQQ -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTGraphQQ.h TGraphQQ_Paint" c_tgraphqq_paint ::+               Ptr RawTGraphQQ -> CString -> IO () -foreign import ccall safe "HROOTGrafTGraphQQ.h TGraphQQ_printObj"-               c_tgraphqq_printobj :: Ptr RawTGraphQQ -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTGraphQQ.h TGraphQQ_printObj" c_tgraphqq_printobj ::+               Ptr RawTGraphQQ -> CString -> IO () -foreign import ccall safe "HROOTGrafTGraphQQ.h TGraphQQ_SaveAs"-               c_tgraphqq_saveas :: Ptr RawTGraphQQ -> CString -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTGraphQQ.h TGraphQQ_SaveAs" c_tgraphqq_saveas ::+               Ptr RawTGraphQQ -> CString -> CString -> IO () -foreign import ccall safe "HROOTGrafTGraphQQ.h TGraphQQ_Write"-               c_tgraphqq_write ::+foreign import ccall interruptible+               "HROOTGrafTGraphQQ.h TGraphQQ_Write" c_tgraphqq_write ::                Ptr RawTGraphQQ -> CString -> CInt -> CInt -> IO CInt -foreign import ccall safe "HROOTGrafTGraphQQ.h TGraphQQ_delete"-               c_tgraphqq_delete :: Ptr RawTGraphQQ -> IO ()+foreign import ccall interruptible+               "HROOTGrafTGraphQQ.h TGraphQQ_Write_" c_tgraphqq_write_ ::+               Ptr RawTGraphQQ -> IO CInt -foreign import ccall safe+foreign import ccall interruptible+               "HROOTGrafTGraphQQ.h TGraphQQ_delete" c_tgraphqq_delete ::+               Ptr RawTGraphQQ -> IO ()++foreign import ccall interruptible                "HROOTGrafTGraphQQ.h TGraphQQ_newTGraphQQ" c_tgraphqq_newtgraphqq                ::-               CInt ->-                 (Ptr CDouble) -> CInt -> (Ptr CDouble) -> IO (Ptr RawTGraphQQ)+               CInt -> Ptr CDouble -> CInt -> Ptr CDouble -> IO (Ptr RawTGraphQQ)
src/HROOT/Graf/TGraphQQ/Implementation.hs view
@@ -1,17 +1,26 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances,   ForeignFunctionInterface, IncoherentInstances,-  MultiParamTypeClasses, OverlappingInstances, TypeFamilies,-  TypeSynonymInstances #-}+  MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+  TypeFamilies, TypeSynonymInstances #-} module HROOT.Graf.TGraphQQ.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Graf.TGraphQQ.RawType import HROOT.Graf.TGraphQQ.FFI import HROOT.Graf.TGraphQQ.Interface import HROOT.Graf.TGraphQQ.Cast+import HROOT.Graf.TGraphQQ.RawType+import HROOT.Graf.TGraphQQ.Cast+import HROOT.Graf.TGraphQQ.Interface import HROOT.Hist.TF1.RawType import HROOT.Hist.TF1.Cast import HROOT.Hist.TF1.Interface@@ -42,13 +51,13 @@ import HROOT.Core.TObject.RawType import HROOT.Core.TObject.Cast import HROOT.Core.TObject.Interface-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Cast-import HROOT.Core.Deletable.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITGraphQQ TGraphQQ+instance () => ITGraphQQ (TGraphQQ) where -instance ITGraph TGraphQQ where+instance () => ITGraph (TGraphQQ) where         apply = xform1 c_tgraphqq_apply         chisquare = xform1 c_tgraphqq_chisquare         drawGraph = xform4 c_tgraphqq_drawgraph@@ -83,12 +92,12 @@         set = xform1 c_tgraphqq_set         setPoint = xform3 c_tgraphqq_setpoint -instance ITNamed TGraphQQ where+instance () => ITNamed (TGraphQQ) where         setName = xform1 c_tgraphqq_setname         setNameTitle = xform2 c_tgraphqq_setnametitle         setTitle = xform1 c_tgraphqq_settitle -instance ITAttLine TGraphQQ where+instance () => ITAttLine (TGraphQQ) where         getLineColor = xform0 c_tgraphqq_getlinecolor         getLineStyle = xform0 c_tgraphqq_getlinestyle         getLineWidth = xform0 c_tgraphqq_getlinewidth@@ -98,11 +107,11 @@         setLineStyle = xform1 c_tgraphqq_setlinestyle         setLineWidth = xform1 c_tgraphqq_setlinewidth -instance ITAttFill TGraphQQ where+instance () => ITAttFill (TGraphQQ) where         setFillColor = xform1 c_tgraphqq_setfillcolor         setFillStyle = xform1 c_tgraphqq_setfillstyle -instance ITAttMarker TGraphQQ where+instance () => ITAttMarker (TGraphQQ) where         getMarkerColor = xform0 c_tgraphqq_getmarkercolor         getMarkerStyle = xform0 c_tgraphqq_getmarkerstyle         getMarkerSize = xform0 c_tgraphqq_getmarkersize@@ -112,7 +121,8 @@         setMarkerStyle = xform1 c_tgraphqq_setmarkerstyle         setMarkerSize = xform1 c_tgraphqq_setmarkersize -instance ITObject TGraphQQ where+instance () => ITObject (TGraphQQ) where+        clear = xform1 c_tgraphqq_clear         draw = xform1 c_tgraphqq_draw         findObject = xform1 c_tgraphqq_findobject         getName = xform0 c_tgraphqq_getname@@ -121,10 +131,11 @@         printObj = xform1 c_tgraphqq_printobj         saveAs = xform2 c_tgraphqq_saveas         write = xform3 c_tgraphqq_write+        write_ = xform0 c_tgraphqq_write_ -instance IDeletable TGraphQQ where+instance () => IDeletable (TGraphQQ) where         delete = xform0 c_tgraphqq_delete  newTGraphQQ ::-              CInt -> (Ptr CDouble) -> CInt -> (Ptr CDouble) -> IO TGraphQQ+              () => CInt -> Ptr CDouble -> CInt -> Ptr CDouble -> IO TGraphQQ newTGraphQQ = xform3 c_tgraphqq_newtgraphqq
src/HROOT/Graf/TGraphQQ/Interface.hs view
@@ -4,13 +4,14 @@   TypeSynonymInstances #-} module HROOT.Graf.TGraphQQ.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Graf.TGraphQQ.RawType import HROOT.Hist.TGraph.Interface -class ITGraph a => ITGraphQQ a+class (ITGraph a) => ITGraphQQ a where  upcastTGraphQQ :: forall a . (FPtr a, ITGraphQQ a) => a -> TGraphQQ upcastTGraphQQ h
src/HROOT/Graf/TGraphQQ/RawType.hs view
@@ -8,9 +8,9 @@ data RawTGraphQQ  newtype TGraphQQ = TGraphQQ (Ptr RawTGraphQQ)-                 deriving (Eq, Ord, Show)+                     deriving (Eq, Ord, Show) -instance FPtr TGraphQQ where+instance () => FPtr (TGraphQQ) where         type Raw TGraphQQ = RawTGraphQQ         get_fptr (TGraphQQ ptr) = ptr         cast_fptr_to_obj = TGraphQQ
+ src/HROOT/Graf/TH.hs view
@@ -0,0 +1,12 @@+{-# LANGUAGE FlexibleContexts, FlexibleInstances,+  ForeignFunctionInterface, InterruptibleFFI, TemplateHaskell #-}+module HROOT.Graf.TH () where+import Data.Char+import Data.List+import Data.Monoid+import Foreign.C.Types+import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH
src/HROOT/Graf/TLine.hs view
@@ -1,7 +1,8 @@ module HROOT.Graf.TLine        (TLine(..), ITLine(..), upcastTLine, downcastTLine, newTLine,-        tLineGetX1, tLineGetX2, tLineGetY1, tLineGetY2, tLineIsHorizontal,-        tLineIsVertical, tLineSetHorizontal, tLineSetVertical)+        tLine_GetX1, tLine_GetX2, tLine_GetY1, tLine_GetY2,+        tLine_IsHorizontal, tLine_IsVertical, tLine_SetHorizontal,+        tLine_SetVertical)        where import HROOT.Graf.TLine.RawType import HROOT.Graf.TLine.Interface
src/HROOT/Graf/TLine/Cast.hs view
@@ -8,10 +8,10 @@ import HROOT.Graf.TLine.RawType import HROOT.Graf.TLine.Interface -instance (ITLine a, FPtr a) => Castable a (Ptr RawTLine) where+instance (ITLine a, FPtr a) => Castable (a) (Ptr RawTLine) where         cast x f = f (castPtr (get_fptr x))         uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TLine (Ptr RawTLine) where+instance () => Castable (TLine) (Ptr RawTLine) where         cast x f = f (castPtr (get_fptr x))         uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Graf/TLine/FFI.hsc view
@@ -1,120 +1,143 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Graf.TLine.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Graf.TLine.RawType+import HROOT.Graf.TLine.RawType import HROOT.Core.TObject.RawType import HROOT.Core.TClass.RawType -foreign import ccall safe "HROOTGrafTLine.h TLine_Draw"+foreign import ccall interruptible "HROOTGrafTLine.h TLine_Clear"+               c_tline_clear :: Ptr RawTLine -> CString -> IO ()++foreign import ccall interruptible "HROOTGrafTLine.h TLine_Draw"                c_tline_draw :: Ptr RawTLine -> CString -> IO () -foreign import ccall safe "HROOTGrafTLine.h TLine_FindObject"-               c_tline_findobject ::+foreign import ccall interruptible+               "HROOTGrafTLine.h TLine_FindObject" c_tline_findobject ::                Ptr RawTLine -> CString -> IO (Ptr RawTObject) -foreign import ccall safe "HROOTGrafTLine.h TLine_GetName"+foreign import ccall interruptible "HROOTGrafTLine.h TLine_GetName"                c_tline_getname :: Ptr RawTLine -> IO CString -foreign import ccall safe "HROOTGrafTLine.h TLine_IsA" c_tline_isa-               :: Ptr RawTLine -> IO (Ptr RawTClass)+foreign import ccall interruptible "HROOTGrafTLine.h TLine_IsA"+               c_tline_isa :: Ptr RawTLine -> IO (Ptr RawTClass) -foreign import ccall safe "HROOTGrafTLine.h TLine_Paint"+foreign import ccall interruptible "HROOTGrafTLine.h TLine_Paint"                c_tline_paint :: Ptr RawTLine -> CString -> IO () -foreign import ccall safe "HROOTGrafTLine.h TLine_printObj"-               c_tline_printobj :: Ptr RawTLine -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTLine.h TLine_printObj" c_tline_printobj ::+               Ptr RawTLine -> CString -> IO () -foreign import ccall safe "HROOTGrafTLine.h TLine_SaveAs"+foreign import ccall interruptible "HROOTGrafTLine.h TLine_SaveAs"                c_tline_saveas :: Ptr RawTLine -> CString -> CString -> IO () -foreign import ccall safe "HROOTGrafTLine.h TLine_Write"+foreign import ccall interruptible "HROOTGrafTLine.h TLine_Write"                c_tline_write :: Ptr RawTLine -> CString -> CInt -> CInt -> IO CInt -foreign import ccall safe "HROOTGrafTLine.h TLine_GetLineColor"-               c_tline_getlinecolor :: Ptr RawTLine -> IO CInt+foreign import ccall interruptible "HROOTGrafTLine.h TLine_Write_"+               c_tline_write_ :: Ptr RawTLine -> IO CInt -foreign import ccall safe "HROOTGrafTLine.h TLine_GetLineStyle"-               c_tline_getlinestyle :: Ptr RawTLine -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTLine.h TLine_GetLineColor" c_tline_getlinecolor ::+               Ptr RawTLine -> IO CShort -foreign import ccall safe "HROOTGrafTLine.h TLine_GetLineWidth"-               c_tline_getlinewidth :: Ptr RawTLine -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTLine.h TLine_GetLineStyle" c_tline_getlinestyle ::+               Ptr RawTLine -> IO CShort -foreign import ccall safe "HROOTGrafTLine.h TLine_ResetAttLine"-               c_tline_resetattline :: Ptr RawTLine -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTLine.h TLine_GetLineWidth" c_tline_getlinewidth ::+               Ptr RawTLine -> IO CShort -foreign import ccall safe+foreign import ccall interruptible+               "HROOTGrafTLine.h TLine_ResetAttLine" c_tline_resetattline ::+               Ptr RawTLine -> CString -> IO ()++foreign import ccall interruptible                "HROOTGrafTLine.h TLine_SetLineAttributes"                c_tline_setlineattributes :: Ptr RawTLine -> IO () -foreign import ccall safe "HROOTGrafTLine.h TLine_SetLineColor"-               c_tline_setlinecolor :: Ptr RawTLine -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTLine.h TLine_SetLineColor" c_tline_setlinecolor ::+               Ptr RawTLine -> CShort -> IO () -foreign import ccall safe "HROOTGrafTLine.h TLine_SetLineStyle"-               c_tline_setlinestyle :: Ptr RawTLine -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTLine.h TLine_SetLineStyle" c_tline_setlinestyle ::+               Ptr RawTLine -> CShort -> IO () -foreign import ccall safe "HROOTGrafTLine.h TLine_SetLineWidth"-               c_tline_setlinewidth :: Ptr RawTLine -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTLine.h TLine_SetLineWidth" c_tline_setlinewidth ::+               Ptr RawTLine -> CShort -> IO () -foreign import ccall safe "HROOTGrafTLine.h TLine_delete"+foreign import ccall interruptible "HROOTGrafTLine.h TLine_delete"                c_tline_delete :: Ptr RawTLine -> IO () -foreign import ccall safe "HROOTGrafTLine.h TLine_newTLine"-               c_tline_newtline ::+foreign import ccall interruptible+               "HROOTGrafTLine.h TLine_newTLine" c_tline_newtline ::                CDouble -> CDouble -> CDouble -> CDouble -> IO (Ptr RawTLine) -foreign import ccall safe "HROOTGrafTLine.h TLine_DrawLine"-               c_tline_drawline ::+foreign import ccall interruptible+               "HROOTGrafTLine.h TLine_DrawLine" c_tline_drawline ::                Ptr RawTLine ->                  CDouble -> CDouble -> CDouble -> CDouble -> IO (Ptr RawTLine) -foreign import ccall safe "HROOTGrafTLine.h TLine_DrawLineNDC"-               c_tline_drawlinendc ::+foreign import ccall interruptible+               "HROOTGrafTLine.h TLine_DrawLineNDC" c_tline_drawlinendc ::                Ptr RawTLine ->                  CDouble -> CDouble -> CDouble -> CDouble -> IO (Ptr RawTLine) -foreign import ccall safe "HROOTGrafTLine.h TLine_tLineGetX1"-               c_tline_tlinegetx1 :: Ptr RawTLine -> IO CDouble+foreign import ccall interruptible+               "HROOTGrafTLine.h TLine_tLine_GetX1" c_tline_tline_getx1 ::+               Ptr RawTLine -> IO CDouble -foreign import ccall safe "HROOTGrafTLine.h TLine_tLineGetX2"-               c_tline_tlinegetx2 :: Ptr RawTLine -> IO CDouble+foreign import ccall interruptible+               "HROOTGrafTLine.h TLine_tLine_GetX2" c_tline_tline_getx2 ::+               Ptr RawTLine -> IO CDouble -foreign import ccall safe "HROOTGrafTLine.h TLine_tLineGetY1"-               c_tline_tlinegety1 :: Ptr RawTLine -> IO CDouble+foreign import ccall interruptible+               "HROOTGrafTLine.h TLine_tLine_GetY1" c_tline_tline_gety1 ::+               Ptr RawTLine -> IO CDouble -foreign import ccall safe "HROOTGrafTLine.h TLine_tLineGetY2"-               c_tline_tlinegety2 :: Ptr RawTLine -> IO CDouble+foreign import ccall interruptible+               "HROOTGrafTLine.h TLine_tLine_GetY2" c_tline_tline_gety2 ::+               Ptr RawTLine -> IO CDouble -foreign import ccall safe-               "HROOTGrafTLine.h TLine_tLineIsHorizontal"-               c_tline_tlineishorizontal :: Ptr RawTLine -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTLine.h TLine_tLine_IsHorizontal"+               c_tline_tline_ishorizontal :: Ptr RawTLine -> IO CBool -foreign import ccall safe "HROOTGrafTLine.h TLine_tLineIsVertical"-               c_tline_tlineisvertical :: Ptr RawTLine -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTLine.h TLine_tLine_IsVertical" c_tline_tline_isvertical+               :: Ptr RawTLine -> IO CBool -foreign import ccall safe "HROOTGrafTLine.h TLine_PaintLine"-               c_tline_paintline ::+foreign import ccall interruptible+               "HROOTGrafTLine.h TLine_PaintLine" c_tline_paintline ::                Ptr RawTLine -> CDouble -> CDouble -> CDouble -> CDouble -> IO () -foreign import ccall safe "HROOTGrafTLine.h TLine_PaintLineNDC"-               c_tline_paintlinendc ::+foreign import ccall interruptible+               "HROOTGrafTLine.h TLine_PaintLineNDC" c_tline_paintlinendc ::                Ptr RawTLine -> CDouble -> CDouble -> CDouble -> CDouble -> IO () -foreign import ccall safe-               "HROOTGrafTLine.h TLine_tLineSetHorizontal"-               c_tline_tlinesethorizontal :: Ptr RawTLine -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTLine.h TLine_tLine_SetHorizontal"+               c_tline_tline_sethorizontal :: Ptr RawTLine -> CBool -> IO () -foreign import ccall safe "HROOTGrafTLine.h TLine_tLineSetVertical"-               c_tline_tlinesetvertical :: Ptr RawTLine -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTLine.h TLine_tLine_SetVertical"+               c_tline_tline_setvertical :: Ptr RawTLine -> CBool -> IO () -foreign import ccall safe "HROOTGrafTLine.h TLine_SetX1"+foreign import ccall interruptible "HROOTGrafTLine.h TLine_SetX1"                c_tline_setx1 :: Ptr RawTLine -> CDouble -> IO () -foreign import ccall safe "HROOTGrafTLine.h TLine_SetX2"+foreign import ccall interruptible "HROOTGrafTLine.h TLine_SetX2"                c_tline_setx2 :: Ptr RawTLine -> CDouble -> IO () -foreign import ccall safe "HROOTGrafTLine.h TLine_SetY1"+foreign import ccall interruptible "HROOTGrafTLine.h TLine_SetY1"                c_tline_sety1 :: Ptr RawTLine -> CDouble -> IO () -foreign import ccall safe "HROOTGrafTLine.h TLine_SetY2"+foreign import ccall interruptible "HROOTGrafTLine.h TLine_SetY2"                c_tline_sety2 :: Ptr RawTLine -> CDouble -> IO ()
src/HROOT/Graf/TLine/Implementation.hs view
@@ -1,17 +1,26 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances,   ForeignFunctionInterface, IncoherentInstances,-  MultiParamTypeClasses, OverlappingInstances, TypeFamilies,-  TypeSynonymInstances #-}+  MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+  TypeFamilies, TypeSynonymInstances #-} module HROOT.Graf.TLine.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Graf.TLine.RawType import HROOT.Graf.TLine.FFI import HROOT.Graf.TLine.Interface import HROOT.Graf.TLine.Cast+import HROOT.Graf.TLine.RawType+import HROOT.Graf.TLine.Cast+import HROOT.Graf.TLine.Interface import HROOT.Core.TClass.RawType import HROOT.Core.TClass.Cast import HROOT.Core.TClass.Interface@@ -21,11 +30,11 @@ import HROOT.Core.TAttLine.RawType import HROOT.Core.TAttLine.Cast import HROOT.Core.TAttLine.Interface-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Cast-import HROOT.Core.Deletable.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITLine TLine where+instance () => ITLine (TLine) where         drawLine = xform4 c_tline_drawline         drawLineNDC = xform4 c_tline_drawlinendc         paintLine = xform4 c_tline_paintline@@ -35,7 +44,8 @@         setY1 = xform1 c_tline_sety1         setY2 = xform1 c_tline_sety2 -instance ITObject TLine where+instance () => ITObject (TLine) where+        clear = xform1 c_tline_clear         draw = xform1 c_tline_draw         findObject = xform1 c_tline_findobject         getName = xform0 c_tline_getname@@ -44,8 +54,9 @@         printObj = xform1 c_tline_printobj         saveAs = xform2 c_tline_saveas         write = xform3 c_tline_write+        write_ = xform0 c_tline_write_ -instance ITAttLine TLine where+instance () => ITAttLine (TLine) where         getLineColor = xform0 c_tline_getlinecolor         getLineStyle = xform0 c_tline_getlinestyle         getLineWidth = xform0 c_tline_getlinewidth@@ -55,32 +66,33 @@         setLineStyle = xform1 c_tline_setlinestyle         setLineWidth = xform1 c_tline_setlinewidth -instance IDeletable TLine where+instance () => IDeletable (TLine) where         delete = xform0 c_tline_delete -newTLine :: CDouble -> CDouble -> CDouble -> CDouble -> IO TLine+newTLine ::+           () => CDouble -> CDouble -> CDouble -> CDouble -> IO TLine newTLine = xform3 c_tline_newtline -tLineGetX1 :: TLine -> IO CDouble-tLineGetX1 = xform0 c_tline_tlinegetx1+tLine_GetX1 :: () => TLine -> IO CDouble+tLine_GetX1 = xform0 c_tline_tline_getx1 -tLineGetX2 :: TLine -> IO CDouble-tLineGetX2 = xform0 c_tline_tlinegetx2+tLine_GetX2 :: () => TLine -> IO CDouble+tLine_GetX2 = xform0 c_tline_tline_getx2 -tLineGetY1 :: TLine -> IO CDouble-tLineGetY1 = xform0 c_tline_tlinegety1+tLine_GetY1 :: () => TLine -> IO CDouble+tLine_GetY1 = xform0 c_tline_tline_gety1 -tLineGetY2 :: TLine -> IO CDouble-tLineGetY2 = xform0 c_tline_tlinegety2+tLine_GetY2 :: () => TLine -> IO CDouble+tLine_GetY2 = xform0 c_tline_tline_gety2 -tLineIsHorizontal :: TLine -> IO CInt-tLineIsHorizontal = xform0 c_tline_tlineishorizontal+tLine_IsHorizontal :: () => TLine -> IO CBool+tLine_IsHorizontal = xform0 c_tline_tline_ishorizontal -tLineIsVertical :: TLine -> IO CInt-tLineIsVertical = xform0 c_tline_tlineisvertical+tLine_IsVertical :: () => TLine -> IO CBool+tLine_IsVertical = xform0 c_tline_tline_isvertical -tLineSetHorizontal :: TLine -> CInt -> IO ()-tLineSetHorizontal = xform1 c_tline_tlinesethorizontal+tLine_SetHorizontal :: () => TLine -> CBool -> IO ()+tLine_SetHorizontal = xform1 c_tline_tline_sethorizontal -tLineSetVertical :: TLine -> CInt -> IO ()-tLineSetVertical = xform1 c_tline_tlinesetvertical+tLine_SetVertical :: () => TLine -> CBool -> IO ()+tLine_SetVertical = xform1 c_tline_tline_setvertical
src/HROOT/Graf/TLine/Interface.hs view
@@ -4,6 +4,7 @@   TypeSynonymInstances #-} module HROOT.Graf.TLine.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast@@ -13,23 +14,24 @@  class (ITObject a, ITAttLine a) => ITLine a where         drawLine ::-                   a -> CDouble -> CDouble -> CDouble -> CDouble -> IO TLine+                   () => a -> CDouble -> CDouble -> CDouble -> CDouble -> IO TLine                  drawLineNDC ::-                      a -> CDouble -> CDouble -> CDouble -> CDouble -> IO TLine+                      () => a -> CDouble -> CDouble -> CDouble -> CDouble -> IO TLine         -        paintLine :: a -> CDouble -> CDouble -> CDouble -> CDouble -> IO ()+        paintLine ::+                    () => a -> CDouble -> CDouble -> CDouble -> CDouble -> IO ()                  paintLineNDC ::-                       a -> CDouble -> CDouble -> CDouble -> CDouble -> IO ()+                       () => a -> CDouble -> CDouble -> CDouble -> CDouble -> IO ()         -        setX1 :: a -> CDouble -> IO ()+        setX1 :: () => a -> CDouble -> IO ()         -        setX2 :: a -> CDouble -> IO ()+        setX2 :: () => a -> CDouble -> IO ()         -        setY1 :: a -> CDouble -> IO ()+        setY1 :: () => a -> CDouble -> IO ()         -        setY2 :: a -> CDouble -> IO ()+        setY2 :: () => a -> CDouble -> IO ()  upcastTLine :: forall a . (FPtr a, ITLine a) => a -> TLine upcastTLine h
src/HROOT/Graf/TLine/RawType.hs view
@@ -8,9 +8,9 @@ data RawTLine  newtype TLine = TLine (Ptr RawTLine)-              deriving (Eq, Ord, Show)+                  deriving (Eq, Ord, Show) -instance FPtr TLine where+instance () => FPtr (TLine) where         type Raw TLine = RawTLine         get_fptr (TLine ptr) = ptr         cast_fptr_to_obj = TLine
+ src/HROOT/Graf/TMarker.hs view
@@ -0,0 +1,7 @@+module HROOT.Graf.TMarker+       (TMarker(..), ITMarker(..), upcastTMarker, downcastTMarker,+        newTMarker, tMarker_GetX, tMarker_GetY)+       where+import HROOT.Graf.TMarker.RawType+import HROOT.Graf.TMarker.Interface+import HROOT.Graf.TMarker.Implementation
+ src/HROOT/Graf/TMarker/Cast.hs view
@@ -0,0 +1,18 @@+{-# LANGUAGE FlexibleInstances, FlexibleContexts, TypeFamilies,+  MultiParamTypeClasses, OverlappingInstances, IncoherentInstances+  #-}+module HROOT.Graf.TMarker.Cast where+import Foreign.Ptr+import FFICXX.Runtime.Cast+import System.IO.Unsafe+import HROOT.Graf.TMarker.RawType+import HROOT.Graf.TMarker.Interface++instance (ITMarker a, FPtr a) => Castable (a) (Ptr RawTMarker)+         where+        cast x f = f (castPtr (get_fptr x))+        uncast x f = f (cast_fptr_to_obj (castPtr x))++instance () => Castable (TMarker) (Ptr RawTMarker) where+        cast x f = f (castPtr (get_fptr x))+        uncast x f = f (cast_fptr_to_obj (castPtr x))
+ src/HROOT/Graf/TMarker/FFI.hsc view
@@ -0,0 +1,126 @@+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-}+module HROOT.Graf.TMarker.FFI where+import Data.Word+import Data.Int+import Foreign.C+import Foreign.Ptr+import HROOT.Graf.TMarker.RawType+import HROOT.Graf.TMarker.RawType+import HROOT.Core.TObject.RawType+import HROOT.Core.TClass.RawType+import HROOT.Core.Rectangle_t.RawType++foreign import ccall interruptible+               "HROOTGrafTMarker.h TMarker_Clear" c_tmarker_clear ::+               Ptr RawTMarker -> CString -> IO ()++foreign import ccall interruptible+               "HROOTGrafTMarker.h TMarker_Draw" c_tmarker_draw ::+               Ptr RawTMarker -> CString -> IO ()++foreign import ccall interruptible+               "HROOTGrafTMarker.h TMarker_FindObject" c_tmarker_findobject ::+               Ptr RawTMarker -> CString -> IO (Ptr RawTObject)++foreign import ccall interruptible+               "HROOTGrafTMarker.h TMarker_GetName" c_tmarker_getname ::+               Ptr RawTMarker -> IO CString++foreign import ccall interruptible "HROOTGrafTMarker.h TMarker_IsA"+               c_tmarker_isa :: Ptr RawTMarker -> IO (Ptr RawTClass)++foreign import ccall interruptible+               "HROOTGrafTMarker.h TMarker_Paint" c_tmarker_paint ::+               Ptr RawTMarker -> CString -> IO ()++foreign import ccall interruptible+               "HROOTGrafTMarker.h TMarker_printObj" c_tmarker_printobj ::+               Ptr RawTMarker -> CString -> IO ()++foreign import ccall interruptible+               "HROOTGrafTMarker.h TMarker_SaveAs" c_tmarker_saveas ::+               Ptr RawTMarker -> CString -> CString -> IO ()++foreign import ccall interruptible+               "HROOTGrafTMarker.h TMarker_Write" c_tmarker_write ::+               Ptr RawTMarker -> CString -> CInt -> CInt -> IO CInt++foreign import ccall interruptible+               "HROOTGrafTMarker.h TMarker_Write_" c_tmarker_write_ ::+               Ptr RawTMarker -> IO CInt++foreign import ccall interruptible+               "HROOTGrafTMarker.h TMarker_GetMarkerColor"+               c_tmarker_getmarkercolor :: Ptr RawTMarker -> IO CShort++foreign import ccall interruptible+               "HROOTGrafTMarker.h TMarker_GetMarkerStyle"+               c_tmarker_getmarkerstyle :: Ptr RawTMarker -> IO CShort++foreign import ccall interruptible+               "HROOTGrafTMarker.h TMarker_GetMarkerSize" c_tmarker_getmarkersize+               :: Ptr RawTMarker -> IO CFloat++foreign import ccall interruptible+               "HROOTGrafTMarker.h TMarker_ResetAttMarker"+               c_tmarker_resetattmarker :: Ptr RawTMarker -> CString -> IO ()++foreign import ccall interruptible+               "HROOTGrafTMarker.h TMarker_SetMarkerAttributes"+               c_tmarker_setmarkerattributes :: Ptr RawTMarker -> IO ()++foreign import ccall interruptible+               "HROOTGrafTMarker.h TMarker_SetMarkerColor"+               c_tmarker_setmarkercolor :: Ptr RawTMarker -> CShort -> IO ()++foreign import ccall interruptible+               "HROOTGrafTMarker.h TMarker_SetMarkerStyle"+               c_tmarker_setmarkerstyle :: Ptr RawTMarker -> CShort -> IO ()++foreign import ccall interruptible+               "HROOTGrafTMarker.h TMarker_SetMarkerSize" c_tmarker_setmarkersize+               :: Ptr RawTMarker -> CShort -> IO ()++foreign import ccall interruptible+               "HROOTGrafTMarker.h TMarker_GetBBox" c_tmarker_getbbox ::+               Ptr RawTMarker -> IO (Ptr RawRectangle_t)++foreign import ccall interruptible+               "HROOTGrafTMarker.h TMarker_SetBBoxX1" c_tmarker_setbboxx1 ::+               Ptr RawTMarker -> CInt -> IO ()++foreign import ccall interruptible+               "HROOTGrafTMarker.h TMarker_SetBBoxX2" c_tmarker_setbboxx2 ::+               Ptr RawTMarker -> CInt -> IO ()++foreign import ccall interruptible+               "HROOTGrafTMarker.h TMarker_SetBBoxY1" c_tmarker_setbboxy1 ::+               Ptr RawTMarker -> CInt -> IO ()++foreign import ccall interruptible+               "HROOTGrafTMarker.h TMarker_SetBBoxY2" c_tmarker_setbboxy2 ::+               Ptr RawTMarker -> CInt -> IO ()++foreign import ccall interruptible+               "HROOTGrafTMarker.h TMarker_delete" c_tmarker_delete ::+               Ptr RawTMarker -> IO ()++foreign import ccall interruptible+               "HROOTGrafTMarker.h TMarker_newTMarker" c_tmarker_newtmarker ::+               CDouble -> CDouble -> CInt -> IO (Ptr RawTMarker)++foreign import ccall interruptible+               "HROOTGrafTMarker.h TMarker_tMarker_GetX" c_tmarker_tmarker_getx ::+               Ptr RawTMarker -> IO CDouble++foreign import ccall interruptible+               "HROOTGrafTMarker.h TMarker_tMarker_GetY" c_tmarker_tmarker_gety ::+               Ptr RawTMarker -> IO CDouble++foreign import ccall interruptible+               "HROOTGrafTMarker.h TMarker_SetX" c_tmarker_setx ::+               Ptr RawTMarker -> CDouble -> IO ()++foreign import ccall interruptible+               "HROOTGrafTMarker.h TMarker_SetY" c_tmarker_sety ::+               Ptr RawTMarker -> CDouble -> IO ()
+ src/HROOT/Graf/TMarker/Implementation.hs view
@@ -0,0 +1,86 @@+{-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances,+  ForeignFunctionInterface, IncoherentInstances,+  MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+  TypeFamilies, TypeSynonymInstances #-}+module HROOT.Graf.TMarker.Implementation where+import Data.Monoid+import Data.Word+import Data.Int+import Foreign.C+import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax+import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH+import HROOT.Graf.TMarker.RawType+import HROOT.Graf.TMarker.FFI+import HROOT.Graf.TMarker.Interface+import HROOT.Graf.TMarker.Cast+import HROOT.Graf.TMarker.RawType+import HROOT.Graf.TMarker.Cast+import HROOT.Graf.TMarker.Interface+import HROOT.Core.TClass.RawType+import HROOT.Core.TClass.Cast+import HROOT.Core.TClass.Interface+import HROOT.Core.Rectangle_t.RawType+import HROOT.Core.Rectangle_t.Cast+import HROOT.Core.Rectangle_t.Interface+import HROOT.Core.TObject.RawType+import HROOT.Core.TObject.Cast+import HROOT.Core.TObject.Interface+import HROOT.Core.TAttMarker.RawType+import HROOT.Core.TAttMarker.Cast+import HROOT.Core.TAttMarker.Interface+import HROOT.Core.TAttBBox2D.RawType+import HROOT.Core.TAttBBox2D.Cast+import HROOT.Core.TAttBBox2D.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface++instance () => ITMarker (TMarker) where+        setX = xform1 c_tmarker_setx+        setY = xform1 c_tmarker_sety++instance () => ITObject (TMarker) where+        clear = xform1 c_tmarker_clear+        draw = xform1 c_tmarker_draw+        findObject = xform1 c_tmarker_findobject+        getName = xform0 c_tmarker_getname+        isA = xform0 c_tmarker_isa+        paint = xform1 c_tmarker_paint+        printObj = xform1 c_tmarker_printobj+        saveAs = xform2 c_tmarker_saveas+        write = xform3 c_tmarker_write+        write_ = xform0 c_tmarker_write_++instance () => ITAttMarker (TMarker) where+        getMarkerColor = xform0 c_tmarker_getmarkercolor+        getMarkerStyle = xform0 c_tmarker_getmarkerstyle+        getMarkerSize = xform0 c_tmarker_getmarkersize+        resetAttMarker = xform1 c_tmarker_resetattmarker+        setMarkerAttributes = xform0 c_tmarker_setmarkerattributes+        setMarkerColor = xform1 c_tmarker_setmarkercolor+        setMarkerStyle = xform1 c_tmarker_setmarkerstyle+        setMarkerSize = xform1 c_tmarker_setmarkersize++instance () => ITAttBBox2D (TMarker) where+        getBBox = xform0 c_tmarker_getbbox+        setBBoxX1 = xform1 c_tmarker_setbboxx1+        setBBoxX2 = xform1 c_tmarker_setbboxx2+        setBBoxY1 = xform1 c_tmarker_setbboxy1+        setBBoxY2 = xform1 c_tmarker_setbboxy2++instance () => IDeletable (TMarker) where+        delete = xform0 c_tmarker_delete++newTMarker :: () => CDouble -> CDouble -> CInt -> IO TMarker+newTMarker = xform2 c_tmarker_newtmarker++tMarker_GetX :: () => TMarker -> IO CDouble+tMarker_GetX = xform0 c_tmarker_tmarker_getx++tMarker_GetY :: () => TMarker -> IO CDouble+tMarker_GetY = xform0 c_tmarker_tmarker_gety
+ src/HROOT/Graf/TMarker/Interface.hs view
@@ -0,0 +1,32 @@+{-# LANGUAGE EmptyDataDecls, ExistentialQuantification,+  FlexibleContexts, FlexibleInstances, ForeignFunctionInterface,+  MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies,+  TypeSynonymInstances #-}+module HROOT.Graf.TMarker.Interface where+import Data.Word+import Data.Int+import Foreign.C+import Foreign.Ptr+import FFICXX.Runtime.Cast+import HROOT.Graf.TMarker.RawType+import HROOT.Core.TObject.Interface+import HROOT.Core.TAttMarker.Interface+import HROOT.Core.TAttBBox2D.Interface++class (ITObject a, ITAttMarker a, ITAttBBox2D a) => ITMarker a+      where+        setX :: () => a -> CDouble -> IO ()+        +        setY :: () => a -> CDouble -> IO ()++upcastTMarker :: forall a . (FPtr a, ITMarker a) => a -> TMarker+upcastTMarker h+  = let fh = get_fptr h+        fh2 :: Ptr RawTMarker = castPtr fh+      in cast_fptr_to_obj fh2++downcastTMarker :: forall a . (FPtr a, ITMarker a) => TMarker -> a+downcastTMarker h+  = let fh = get_fptr h+        fh2 = castPtr fh+      in cast_fptr_to_obj fh2
+ src/HROOT/Graf/TMarker/RawType.hs view
@@ -0,0 +1,16 @@+{-# LANGUAGE ForeignFunctionInterface, TypeFamilies,+  MultiParamTypeClasses, FlexibleInstances, TypeSynonymInstances,+  EmptyDataDecls, ExistentialQuantification, ScopedTypeVariables #-}+module HROOT.Graf.TMarker.RawType where+import Foreign.Ptr+import FFICXX.Runtime.Cast++data RawTMarker++newtype TMarker = TMarker (Ptr RawTMarker)+                    deriving (Eq, Ord, Show)++instance () => FPtr (TMarker) where+        type Raw TMarker = RawTMarker+        get_fptr (TMarker ptr) = ptr+        cast_fptr_to_obj = TMarker
src/HROOT/Graf/TPCON/Cast.hs view
@@ -8,10 +8,10 @@ import HROOT.Graf.TPCON.RawType import HROOT.Graf.TPCON.Interface -instance (ITPCON a, FPtr a) => Castable a (Ptr RawTPCON) where+instance (ITPCON a, FPtr a) => Castable (a) (Ptr RawTPCON) where         cast x f = f (castPtr (get_fptr x))         uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TPCON (Ptr RawTPCON) where+instance () => Castable (TPCON) (Ptr RawTPCON) where         cast x f = f (castPtr (get_fptr x))         uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Graf/TPCON/FFI.hsc view
@@ -1,81 +1,101 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Graf.TPCON.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Graf.TPCON.RawType+import HROOT.Graf.TPCON.RawType import HROOT.Core.TObject.RawType import HROOT.Core.TClass.RawType -foreign import ccall safe "HROOTGrafTPCON.h TPCON_SetName"+foreign import ccall interruptible "HROOTGrafTPCON.h TPCON_SetName"                c_tpcon_setname :: Ptr RawTPCON -> CString -> IO () -foreign import ccall safe "HROOTGrafTPCON.h TPCON_SetNameTitle"-               c_tpcon_setnametitle :: Ptr RawTPCON -> CString -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTPCON.h TPCON_SetNameTitle" c_tpcon_setnametitle ::+               Ptr RawTPCON -> CString -> CString -> IO () -foreign import ccall safe "HROOTGrafTPCON.h TPCON_SetTitle"-               c_tpcon_settitle :: Ptr RawTPCON -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTPCON.h TPCON_SetTitle" c_tpcon_settitle ::+               Ptr RawTPCON -> CString -> IO () -foreign import ccall safe "HROOTGrafTPCON.h TPCON_GetLineColor"-               c_tpcon_getlinecolor :: Ptr RawTPCON -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTPCON.h TPCON_GetLineColor" c_tpcon_getlinecolor ::+               Ptr RawTPCON -> IO CShort -foreign import ccall safe "HROOTGrafTPCON.h TPCON_GetLineStyle"-               c_tpcon_getlinestyle :: Ptr RawTPCON -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTPCON.h TPCON_GetLineStyle" c_tpcon_getlinestyle ::+               Ptr RawTPCON -> IO CShort -foreign import ccall safe "HROOTGrafTPCON.h TPCON_GetLineWidth"-               c_tpcon_getlinewidth :: Ptr RawTPCON -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTPCON.h TPCON_GetLineWidth" c_tpcon_getlinewidth ::+               Ptr RawTPCON -> IO CShort -foreign import ccall safe "HROOTGrafTPCON.h TPCON_ResetAttLine"-               c_tpcon_resetattline :: Ptr RawTPCON -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTPCON.h TPCON_ResetAttLine" c_tpcon_resetattline ::+               Ptr RawTPCON -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTPCON.h TPCON_SetLineAttributes"                c_tpcon_setlineattributes :: Ptr RawTPCON -> IO () -foreign import ccall safe "HROOTGrafTPCON.h TPCON_SetLineColor"-               c_tpcon_setlinecolor :: Ptr RawTPCON -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTPCON.h TPCON_SetLineColor" c_tpcon_setlinecolor ::+               Ptr RawTPCON -> CShort -> IO () -foreign import ccall safe "HROOTGrafTPCON.h TPCON_SetLineStyle"-               c_tpcon_setlinestyle :: Ptr RawTPCON -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTPCON.h TPCON_SetLineStyle" c_tpcon_setlinestyle ::+               Ptr RawTPCON -> CShort -> IO () -foreign import ccall safe "HROOTGrafTPCON.h TPCON_SetLineWidth"-               c_tpcon_setlinewidth :: Ptr RawTPCON -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTPCON.h TPCON_SetLineWidth" c_tpcon_setlinewidth ::+               Ptr RawTPCON -> CShort -> IO () -foreign import ccall safe "HROOTGrafTPCON.h TPCON_SetFillColor"-               c_tpcon_setfillcolor :: Ptr RawTPCON -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTPCON.h TPCON_SetFillColor" c_tpcon_setfillcolor ::+               Ptr RawTPCON -> CInt -> IO () -foreign import ccall safe "HROOTGrafTPCON.h TPCON_SetFillStyle"-               c_tpcon_setfillstyle :: Ptr RawTPCON -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTPCON.h TPCON_SetFillStyle" c_tpcon_setfillstyle ::+               Ptr RawTPCON -> CInt -> IO () -foreign import ccall safe "HROOTGrafTPCON.h TPCON_Draw"+foreign import ccall interruptible "HROOTGrafTPCON.h TPCON_Clear"+               c_tpcon_clear :: Ptr RawTPCON -> CString -> IO ()++foreign import ccall interruptible "HROOTGrafTPCON.h TPCON_Draw"                c_tpcon_draw :: Ptr RawTPCON -> CString -> IO () -foreign import ccall safe "HROOTGrafTPCON.h TPCON_FindObject"-               c_tpcon_findobject ::+foreign import ccall interruptible+               "HROOTGrafTPCON.h TPCON_FindObject" c_tpcon_findobject ::                Ptr RawTPCON -> CString -> IO (Ptr RawTObject) -foreign import ccall safe "HROOTGrafTPCON.h TPCON_GetName"+foreign import ccall interruptible "HROOTGrafTPCON.h TPCON_GetName"                c_tpcon_getname :: Ptr RawTPCON -> IO CString -foreign import ccall safe "HROOTGrafTPCON.h TPCON_IsA" c_tpcon_isa-               :: Ptr RawTPCON -> IO (Ptr RawTClass)+foreign import ccall interruptible "HROOTGrafTPCON.h TPCON_IsA"+               c_tpcon_isa :: Ptr RawTPCON -> IO (Ptr RawTClass) -foreign import ccall safe "HROOTGrafTPCON.h TPCON_Paint"+foreign import ccall interruptible "HROOTGrafTPCON.h TPCON_Paint"                c_tpcon_paint :: Ptr RawTPCON -> CString -> IO () -foreign import ccall safe "HROOTGrafTPCON.h TPCON_printObj"-               c_tpcon_printobj :: Ptr RawTPCON -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTPCON.h TPCON_printObj" c_tpcon_printobj ::+               Ptr RawTPCON -> CString -> IO () -foreign import ccall safe "HROOTGrafTPCON.h TPCON_SaveAs"+foreign import ccall interruptible "HROOTGrafTPCON.h TPCON_SaveAs"                c_tpcon_saveas :: Ptr RawTPCON -> CString -> CString -> IO () -foreign import ccall safe "HROOTGrafTPCON.h TPCON_Write"+foreign import ccall interruptible "HROOTGrafTPCON.h TPCON_Write"                c_tpcon_write :: Ptr RawTPCON -> CString -> CInt -> CInt -> IO CInt -foreign import ccall safe "HROOTGrafTPCON.h TPCON_delete"+foreign import ccall interruptible "HROOTGrafTPCON.h TPCON_Write_"+               c_tpcon_write_ :: Ptr RawTPCON -> IO CInt++foreign import ccall interruptible "HROOTGrafTPCON.h TPCON_delete"                c_tpcon_delete :: Ptr RawTPCON -> IO () -foreign import ccall safe "HROOTGrafTPCON.h TPCON_newTPCON"-               c_tpcon_newtpcon ::+foreign import ccall interruptible+               "HROOTGrafTPCON.h TPCON_newTPCON" c_tpcon_newtpcon ::                CString ->-                 CString ->-                   CString -> CDouble -> CDouble -> CInt -> IO (Ptr RawTPCON)+                 CString -> CString -> CFloat -> CFloat -> CInt -> IO (Ptr RawTPCON)
src/HROOT/Graf/TPCON/Implementation.hs view
@@ -1,17 +1,26 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances,   ForeignFunctionInterface, IncoherentInstances,-  MultiParamTypeClasses, OverlappingInstances, TypeFamilies,-  TypeSynonymInstances #-}+  MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+  TypeFamilies, TypeSynonymInstances #-} module HROOT.Graf.TPCON.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Graf.TPCON.RawType import HROOT.Graf.TPCON.FFI import HROOT.Graf.TPCON.Interface import HROOT.Graf.TPCON.Cast+import HROOT.Graf.TPCON.RawType+import HROOT.Graf.TPCON.Cast+import HROOT.Graf.TPCON.Interface import HROOT.Core.TClass.RawType import HROOT.Core.TClass.Cast import HROOT.Core.TClass.Interface@@ -33,20 +42,20 @@ import HROOT.Core.TObject.RawType import HROOT.Core.TObject.Cast import HROOT.Core.TObject.Interface-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Cast-import HROOT.Core.Deletable.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITPCON TPCON+instance () => ITPCON (TPCON) where -instance ITShape TPCON+instance () => ITShape (TPCON) where -instance ITNamed TPCON where+instance () => ITNamed (TPCON) where         setName = xform1 c_tpcon_setname         setNameTitle = xform2 c_tpcon_setnametitle         setTitle = xform1 c_tpcon_settitle -instance ITAttLine TPCON where+instance () => ITAttLine (TPCON) where         getLineColor = xform0 c_tpcon_getlinecolor         getLineStyle = xform0 c_tpcon_getlinestyle         getLineWidth = xform0 c_tpcon_getlinewidth@@ -56,13 +65,14 @@         setLineStyle = xform1 c_tpcon_setlinestyle         setLineWidth = xform1 c_tpcon_setlinewidth -instance ITAttFill TPCON where+instance () => ITAttFill (TPCON) where         setFillColor = xform1 c_tpcon_setfillcolor         setFillStyle = xform1 c_tpcon_setfillstyle -instance ITAtt3D TPCON+instance () => ITAtt3D (TPCON) where -instance ITObject TPCON where+instance () => ITObject (TPCON) where+        clear = xform1 c_tpcon_clear         draw = xform1 c_tpcon_draw         findObject = xform1 c_tpcon_findobject         getName = xform0 c_tpcon_getname@@ -71,11 +81,12 @@         printObj = xform1 c_tpcon_printobj         saveAs = xform2 c_tpcon_saveas         write = xform3 c_tpcon_write+        write_ = xform0 c_tpcon_write_ -instance IDeletable TPCON where+instance () => IDeletable (TPCON) where         delete = xform0 c_tpcon_delete  newTPCON ::            (Castable c2 CString, Castable c1 CString, Castable c0 CString) =>-           c0 -> c1 -> c2 -> CDouble -> CDouble -> CInt -> IO TPCON+           c0 -> c1 -> c2 -> CFloat -> CFloat -> CInt -> IO TPCON newTPCON = xform5 c_tpcon_newtpcon
src/HROOT/Graf/TPCON/Interface.hs view
@@ -4,13 +4,14 @@   TypeSynonymInstances #-} module HROOT.Graf.TPCON.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Graf.TPCON.RawType import HROOT.Graf.TShape.Interface -class ITShape a => ITPCON a+class (ITShape a) => ITPCON a where  upcastTPCON :: forall a . (FPtr a, ITPCON a) => a -> TPCON upcastTPCON h
src/HROOT/Graf/TPCON/RawType.hs view
@@ -8,9 +8,9 @@ data RawTPCON  newtype TPCON = TPCON (Ptr RawTPCON)-              deriving (Eq, Ord, Show)+                  deriving (Eq, Ord, Show) -instance FPtr TPCON where+instance () => FPtr (TPCON) where         type Raw TPCON = RawTPCON         get_fptr (TPCON ptr) = ptr         cast_fptr_to_obj = TPCON
src/HROOT/Graf/TPad.hs view
@@ -1,5 +1,5 @@-module HROOT.Graf.TPad (TPad(..), ITPad, upcastTPad, downcastTPad)-       where+module HROOT.Graf.TPad+       (TPad(..), ITPad(..), upcastTPad, downcastTPad, newTPad) where import HROOT.Graf.TPad.RawType import HROOT.Graf.TPad.Interface import HROOT.Graf.TPad.Implementation
src/HROOT/Graf/TPad/Cast.hs view
@@ -8,10 +8,10 @@ import HROOT.Graf.TPad.RawType import HROOT.Graf.TPad.Interface -instance (ITPad a, FPtr a) => Castable a (Ptr RawTPad) where+instance (ITPad a, FPtr a) => Castable (a) (Ptr RawTPad) where         cast x f = f (castPtr (get_fptr x))         uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TPad (Ptr RawTPad) where+instance () => Castable (TPad) (Ptr RawTPad) where         cast x f = f (castPtr (get_fptr x))         uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Graf/TPad/FFI.hsc view
@@ -1,50 +1,175 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Graf.TPad.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Graf.TPad.RawType+import HROOT.Graf.TPad.RawType import HROOT.Core.TObject.RawType import HROOT.Core.TClass.RawType+import HROOT.Hist.TH1F.RawType+import HROOT.Graf.TView.RawType -foreign import ccall safe "HROOTGrafTPad.h TPad_cd" c_tpad_cd ::-               Ptr RawTPad -> CInt -> IO (Ptr RawTPad)+foreign import ccall interruptible "HROOTGrafTPad.h TPad_cd"+               c_tpad_cd :: Ptr RawTPad -> CInt -> IO (Ptr RawTPad) -foreign import ccall safe "HROOTGrafTPad.h TPad_divide_tvirtualpad"-               c_tpad_divide_tvirtualpad ::-               Ptr RawTPad -> CInt -> CInt -> CDouble -> CDouble -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTPad.h TPad_divide_tvirtualpad" c_tpad_divide_tvirtualpad+               :: Ptr RawTPad -> CInt -> CInt -> CFloat -> CFloat -> CInt -> IO () -foreign import ccall safe "HROOTGrafTPad.h TPad_SetLogx"+foreign import ccall interruptible "HROOTGrafTPad.h TPad_Modified"+               c_tpad_modified :: Ptr RawTPad -> CBool -> IO ()++foreign import ccall interruptible "HROOTGrafTPad.h TPad_Range"+               c_tpad_range ::+               Ptr RawTPad -> CDouble -> CDouble -> CDouble -> CDouble -> IO ()++foreign import ccall interruptible "HROOTGrafTPad.h TPad_SetLogx"                c_tpad_setlogx :: Ptr RawTPad -> CInt -> IO () -foreign import ccall safe "HROOTGrafTPad.h TPad_SetLogy"+foreign import ccall interruptible "HROOTGrafTPad.h TPad_SetLogy"                c_tpad_setlogy :: Ptr RawTPad -> CInt -> IO () -foreign import ccall safe "HROOTGrafTPad.h TPad_SetLogz"+foreign import ccall interruptible "HROOTGrafTPad.h TPad_SetLogz"                c_tpad_setlogz :: Ptr RawTPad -> CInt -> IO () -foreign import ccall safe "HROOTGrafTPad.h TPad_Draw" c_tpad_draw-               :: Ptr RawTPad -> CString -> IO ()+foreign import ccall interruptible "HROOTGrafTPad.h TPad_Update"+               c_tpad_update :: Ptr RawTPad -> IO () -foreign import ccall safe "HROOTGrafTPad.h TPad_FindObject"-               c_tpad_findobject :: Ptr RawTPad -> CString -> IO (Ptr RawTObject)+foreign import ccall interruptible "HROOTGrafTPad.h TPad_Clear"+               c_tpad_clear :: Ptr RawTPad -> CString -> IO () -foreign import ccall safe "HROOTGrafTPad.h TPad_GetName"+foreign import ccall interruptible "HROOTGrafTPad.h TPad_Draw"+               c_tpad_draw :: Ptr RawTPad -> CString -> IO ()++foreign import ccall interruptible+               "HROOTGrafTPad.h TPad_FindObject" c_tpad_findobject ::+               Ptr RawTPad -> CString -> IO (Ptr RawTObject)++foreign import ccall interruptible "HROOTGrafTPad.h TPad_GetName"                c_tpad_getname :: Ptr RawTPad -> IO CString -foreign import ccall safe "HROOTGrafTPad.h TPad_IsA" c_tpad_isa ::-               Ptr RawTPad -> IO (Ptr RawTClass)+foreign import ccall interruptible "HROOTGrafTPad.h TPad_IsA"+               c_tpad_isa :: Ptr RawTPad -> IO (Ptr RawTClass) -foreign import ccall safe "HROOTGrafTPad.h TPad_Paint" c_tpad_paint-               :: Ptr RawTPad -> CString -> IO ()+foreign import ccall interruptible "HROOTGrafTPad.h TPad_Paint"+               c_tpad_paint :: Ptr RawTPad -> CString -> IO () -foreign import ccall safe "HROOTGrafTPad.h TPad_printObj"+foreign import ccall interruptible "HROOTGrafTPad.h TPad_printObj"                c_tpad_printobj :: Ptr RawTPad -> CString -> IO () -foreign import ccall safe "HROOTGrafTPad.h TPad_SaveAs"+foreign import ccall interruptible "HROOTGrafTPad.h TPad_SaveAs"                c_tpad_saveas :: Ptr RawTPad -> CString -> CString -> IO () -foreign import ccall safe "HROOTGrafTPad.h TPad_Write" c_tpad_write-               :: Ptr RawTPad -> CString -> CInt -> CInt -> IO CInt+foreign import ccall interruptible "HROOTGrafTPad.h TPad_Write"+               c_tpad_write :: Ptr RawTPad -> CString -> CInt -> CInt -> IO CInt -foreign import ccall safe "HROOTGrafTPad.h TPad_delete"+foreign import ccall interruptible "HROOTGrafTPad.h TPad_Write_"+               c_tpad_write_ :: Ptr RawTPad -> IO CInt++foreign import ccall interruptible+               "HROOTGrafTPad.h TPad_GetLineColor" c_tpad_getlinecolor ::+               Ptr RawTPad -> IO CShort++foreign import ccall interruptible+               "HROOTGrafTPad.h TPad_GetLineStyle" c_tpad_getlinestyle ::+               Ptr RawTPad -> IO CShort++foreign import ccall interruptible+               "HROOTGrafTPad.h TPad_GetLineWidth" c_tpad_getlinewidth ::+               Ptr RawTPad -> IO CShort++foreign import ccall interruptible+               "HROOTGrafTPad.h TPad_ResetAttLine" c_tpad_resetattline ::+               Ptr RawTPad -> CString -> IO ()++foreign import ccall interruptible+               "HROOTGrafTPad.h TPad_SetLineAttributes" c_tpad_setlineattributes+               :: Ptr RawTPad -> IO ()++foreign import ccall interruptible+               "HROOTGrafTPad.h TPad_SetLineColor" c_tpad_setlinecolor ::+               Ptr RawTPad -> CShort -> IO ()++foreign import ccall interruptible+               "HROOTGrafTPad.h TPad_SetLineStyle" c_tpad_setlinestyle ::+               Ptr RawTPad -> CShort -> IO ()++foreign import ccall interruptible+               "HROOTGrafTPad.h TPad_SetLineWidth" c_tpad_setlinewidth ::+               Ptr RawTPad -> CShort -> IO ()++foreign import ccall interruptible+               "HROOTGrafTPad.h TPad_SetFillColor" c_tpad_setfillcolor ::+               Ptr RawTPad -> CInt -> IO ()++foreign import ccall interruptible+               "HROOTGrafTPad.h TPad_SetFillStyle" c_tpad_setfillstyle ::+               Ptr RawTPad -> CInt -> IO ()++foreign import ccall interruptible+               "HROOTGrafTPad.h TPad_ResetAttPad" c_tpad_resetattpad ::+               Ptr RawTPad -> CString -> IO ()++foreign import ccall interruptible+               "HROOTGrafTPad.h TPad_SetBottomMargin" c_tpad_setbottommargin ::+               Ptr RawTPad -> CFloat -> IO ()++foreign import ccall interruptible+               "HROOTGrafTPad.h TPad_SetLeftMargin" c_tpad_setleftmargin ::+               Ptr RawTPad -> CFloat -> IO ()++foreign import ccall interruptible+               "HROOTGrafTPad.h TPad_SetRightMargin" c_tpad_setrightmargin ::+               Ptr RawTPad -> CFloat -> IO ()++foreign import ccall interruptible+               "HROOTGrafTPad.h TPad_SetTopMargin" c_tpad_settopmargin ::+               Ptr RawTPad -> CFloat -> IO ()++foreign import ccall interruptible "HROOTGrafTPad.h TPad_SetMargin"+               c_tpad_setmargin ::+               Ptr RawTPad -> CFloat -> CFloat -> CFloat -> CFloat -> IO ()++foreign import ccall interruptible "HROOTGrafTPad.h TPad_SetAfile"+               c_tpad_setafile :: Ptr RawTPad -> CFloat -> IO ()++foreign import ccall interruptible "HROOTGrafTPad.h TPad_SetXfile"+               c_tpad_setxfile :: Ptr RawTPad -> CFloat -> IO ()++foreign import ccall interruptible "HROOTGrafTPad.h TPad_SetYfile"+               c_tpad_setyfile :: Ptr RawTPad -> CFloat -> IO ()++foreign import ccall interruptible "HROOTGrafTPad.h TPad_SetAstat"+               c_tpad_setastat :: Ptr RawTPad -> CFloat -> IO ()++foreign import ccall interruptible "HROOTGrafTPad.h TPad_SetXstat"+               c_tpad_setxstat :: Ptr RawTPad -> CFloat -> IO ()++foreign import ccall interruptible "HROOTGrafTPad.h TPad_SetYstat"+               c_tpad_setystat :: Ptr RawTPad -> CFloat -> IO ()++foreign import ccall interruptible "HROOTGrafTPad.h TPad_delete"                c_tpad_delete :: Ptr RawTPad -> IO ()++foreign import ccall interruptible "HROOTGrafTPad.h TPad_newTPad"+               c_tpad_newtpad ::+               CString ->+                 CString ->+                   CDouble -> CDouble -> CDouble -> CDouble -> IO (Ptr RawTPad)++foreign import ccall interruptible "HROOTGrafTPad.h TPad_DrawFrame"+               c_tpad_drawframe ::+               Ptr RawTPad ->+                 CDouble ->+                   CDouble -> CDouble -> CDouble -> CString -> IO (Ptr RawTH1F)++foreign import ccall interruptible "HROOTGrafTPad.h TPad_GetView"+               c_tpad_getview :: Ptr RawTPad -> IO (Ptr RawTView)++foreign import ccall interruptible "HROOTGrafTPad.h TPad_SetView0"+               c_tpad_setview0 :: Ptr RawTPad -> IO ()++foreign import ccall interruptible "HROOTGrafTPad.h TPad_SetView"+               c_tpad_setview :: Ptr RawTPad -> Ptr RawTView -> IO ()
src/HROOT/Graf/TPad/Implementation.hs view
@@ -1,40 +1,75 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances,   ForeignFunctionInterface, IncoherentInstances,-  MultiParamTypeClasses, OverlappingInstances, TypeFamilies,-  TypeSynonymInstances #-}+  MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+  TypeFamilies, TypeSynonymInstances #-} module HROOT.Graf.TPad.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Graf.TPad.RawType import HROOT.Graf.TPad.FFI import HROOT.Graf.TPad.Interface import HROOT.Graf.TPad.Cast+import HROOT.Graf.TPad.RawType+import HROOT.Graf.TPad.Cast+import HROOT.Graf.TPad.Interface import HROOT.Core.TClass.RawType import HROOT.Core.TClass.Cast import HROOT.Core.TClass.Interface+import HROOT.Hist.TH1F.RawType+import HROOT.Hist.TH1F.Cast+import HROOT.Hist.TH1F.Interface+import HROOT.Graf.TView.RawType+import HROOT.Graf.TView.Cast+import HROOT.Graf.TView.Interface import HROOT.Core.TVirtualPad.RawType import HROOT.Core.TVirtualPad.Cast import HROOT.Core.TVirtualPad.Interface import HROOT.Core.TObject.RawType import HROOT.Core.TObject.Cast import HROOT.Core.TObject.Interface-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Cast-import HROOT.Core.Deletable.Interface+import HROOT.Core.TAttLine.RawType+import HROOT.Core.TAttLine.Cast+import HROOT.Core.TAttLine.Interface+import HROOT.Core.TAttFill.RawType+import HROOT.Core.TAttFill.Cast+import HROOT.Core.TAttFill.Interface+import HROOT.Core.TAttPad.RawType+import HROOT.Core.TAttPad.Cast+import HROOT.Core.TAttPad.Interface+import HROOT.Core.TQObject.RawType+import HROOT.Core.TQObject.Cast+import HROOT.Core.TQObject.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITPad TPad+instance () => ITPad (TPad) where+        drawFrame = xform5 c_tpad_drawframe+        getView = xform0 c_tpad_getview+        setView0 = xform0 c_tpad_setview0+        setView = xform1 c_tpad_setview -instance ITVirtualPad TPad where+instance () => ITVirtualPad (TPad) where         cd = xform1 c_tpad_cd         divide_tvirtualpad = xform5 c_tpad_divide_tvirtualpad+        modified = xform1 c_tpad_modified+        range = xform4 c_tpad_range         setLogx = xform1 c_tpad_setlogx         setLogy = xform1 c_tpad_setlogy         setLogz = xform1 c_tpad_setlogz+        update = xform0 c_tpad_update -instance ITObject TPad where+instance () => ITObject (TPad) where+        clear = xform1 c_tpad_clear         draw = xform1 c_tpad_draw         findObject = xform1 c_tpad_findobject         getName = xform0 c_tpad_getname@@ -43,6 +78,42 @@         printObj = xform1 c_tpad_printobj         saveAs = xform2 c_tpad_saveas         write = xform3 c_tpad_write+        write_ = xform0 c_tpad_write_ -instance IDeletable TPad where+instance () => ITAttLine (TPad) where+        getLineColor = xform0 c_tpad_getlinecolor+        getLineStyle = xform0 c_tpad_getlinestyle+        getLineWidth = xform0 c_tpad_getlinewidth+        resetAttLine = xform1 c_tpad_resetattline+        setLineAttributes = xform0 c_tpad_setlineattributes+        setLineColor = xform1 c_tpad_setlinecolor+        setLineStyle = xform1 c_tpad_setlinestyle+        setLineWidth = xform1 c_tpad_setlinewidth++instance () => ITAttFill (TPad) where+        setFillColor = xform1 c_tpad_setfillcolor+        setFillStyle = xform1 c_tpad_setfillstyle++instance () => ITAttPad (TPad) where+        resetAttPad = xform1 c_tpad_resetattpad+        setBottomMargin = xform1 c_tpad_setbottommargin+        setLeftMargin = xform1 c_tpad_setleftmargin+        setRightMargin = xform1 c_tpad_setrightmargin+        setTopMargin = xform1 c_tpad_settopmargin+        setMargin = xform4 c_tpad_setmargin+        setAfile = xform1 c_tpad_setafile+        setXfile = xform1 c_tpad_setxfile+        setYfile = xform1 c_tpad_setyfile+        setAstat = xform1 c_tpad_setastat+        setXstat = xform1 c_tpad_setxstat+        setYstat = xform1 c_tpad_setystat++instance () => ITQObject (TPad) where++instance () => IDeletable (TPad) where         delete = xform0 c_tpad_delete++newTPad ::+          (Castable c1 CString, Castable c0 CString) =>+          c0 -> c1 -> CDouble -> CDouble -> CDouble -> CDouble -> IO TPad+newTPad = xform5 c_tpad_newtpad
src/HROOT/Graf/TPad/Interface.hs view
@@ -4,13 +4,26 @@   TypeSynonymInstances #-} module HROOT.Graf.TPad.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Graf.TPad.RawType+import HROOT.Hist.TH1F.RawType+import HROOT.Graf.TView.RawType import HROOT.Core.TVirtualPad.Interface+import HROOT.Graf.TView.Interface -class ITVirtualPad a => ITPad a+class (ITVirtualPad a) => ITPad a where+        drawFrame ::+                    (Castable c0 CString) =>+                    a -> CDouble -> CDouble -> CDouble -> CDouble -> c0 -> IO TH1F+        +        getView :: () => a -> IO TView+        +        setView0 :: () => a -> IO ()+        +        setView :: (ITView c0, FPtr c0) => a -> c0 -> IO ()  upcastTPad :: forall a . (FPtr a, ITPad a) => a -> TPad upcastTPad h
src/HROOT/Graf/TPad/RawType.hs view
@@ -8,9 +8,9 @@ data RawTPad  newtype TPad = TPad (Ptr RawTPad)-             deriving (Eq, Ord, Show)+                 deriving (Eq, Ord, Show) -instance FPtr TPad where+instance () => FPtr (TPad) where         type Raw TPad = RawTPad         get_fptr (TPad ptr) = ptr         cast_fptr_to_obj = TPad
src/HROOT/Graf/TSPHE/Cast.hs view
@@ -8,10 +8,10 @@ import HROOT.Graf.TSPHE.RawType import HROOT.Graf.TSPHE.Interface -instance (ITSPHE a, FPtr a) => Castable a (Ptr RawTSPHE) where+instance (ITSPHE a, FPtr a) => Castable (a) (Ptr RawTSPHE) where         cast x f = f (castPtr (get_fptr x))         uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TSPHE (Ptr RawTSPHE) where+instance () => Castable (TSPHE) (Ptr RawTSPHE) where         cast x f = f (castPtr (get_fptr x))         uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Graf/TSPHE/FFI.hsc view
@@ -1,84 +1,104 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Graf.TSPHE.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Graf.TSPHE.RawType+import HROOT.Graf.TSPHE.RawType import HROOT.Core.TObject.RawType import HROOT.Core.TClass.RawType -foreign import ccall safe "HROOTGrafTSPHE.h TSPHE_SetName"+foreign import ccall interruptible "HROOTGrafTSPHE.h TSPHE_SetName"                c_tsphe_setname :: Ptr RawTSPHE -> CString -> IO () -foreign import ccall safe "HROOTGrafTSPHE.h TSPHE_SetNameTitle"-               c_tsphe_setnametitle :: Ptr RawTSPHE -> CString -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTSPHE.h TSPHE_SetNameTitle" c_tsphe_setnametitle ::+               Ptr RawTSPHE -> CString -> CString -> IO () -foreign import ccall safe "HROOTGrafTSPHE.h TSPHE_SetTitle"-               c_tsphe_settitle :: Ptr RawTSPHE -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTSPHE.h TSPHE_SetTitle" c_tsphe_settitle ::+               Ptr RawTSPHE -> CString -> IO () -foreign import ccall safe "HROOTGrafTSPHE.h TSPHE_GetLineColor"-               c_tsphe_getlinecolor :: Ptr RawTSPHE -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTSPHE.h TSPHE_GetLineColor" c_tsphe_getlinecolor ::+               Ptr RawTSPHE -> IO CShort -foreign import ccall safe "HROOTGrafTSPHE.h TSPHE_GetLineStyle"-               c_tsphe_getlinestyle :: Ptr RawTSPHE -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTSPHE.h TSPHE_GetLineStyle" c_tsphe_getlinestyle ::+               Ptr RawTSPHE -> IO CShort -foreign import ccall safe "HROOTGrafTSPHE.h TSPHE_GetLineWidth"-               c_tsphe_getlinewidth :: Ptr RawTSPHE -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTSPHE.h TSPHE_GetLineWidth" c_tsphe_getlinewidth ::+               Ptr RawTSPHE -> IO CShort -foreign import ccall safe "HROOTGrafTSPHE.h TSPHE_ResetAttLine"-               c_tsphe_resetattline :: Ptr RawTSPHE -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTSPHE.h TSPHE_ResetAttLine" c_tsphe_resetattline ::+               Ptr RawTSPHE -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTSPHE.h TSPHE_SetLineAttributes"                c_tsphe_setlineattributes :: Ptr RawTSPHE -> IO () -foreign import ccall safe "HROOTGrafTSPHE.h TSPHE_SetLineColor"-               c_tsphe_setlinecolor :: Ptr RawTSPHE -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTSPHE.h TSPHE_SetLineColor" c_tsphe_setlinecolor ::+               Ptr RawTSPHE -> CShort -> IO () -foreign import ccall safe "HROOTGrafTSPHE.h TSPHE_SetLineStyle"-               c_tsphe_setlinestyle :: Ptr RawTSPHE -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTSPHE.h TSPHE_SetLineStyle" c_tsphe_setlinestyle ::+               Ptr RawTSPHE -> CShort -> IO () -foreign import ccall safe "HROOTGrafTSPHE.h TSPHE_SetLineWidth"-               c_tsphe_setlinewidth :: Ptr RawTSPHE -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTSPHE.h TSPHE_SetLineWidth" c_tsphe_setlinewidth ::+               Ptr RawTSPHE -> CShort -> IO () -foreign import ccall safe "HROOTGrafTSPHE.h TSPHE_SetFillColor"-               c_tsphe_setfillcolor :: Ptr RawTSPHE -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTSPHE.h TSPHE_SetFillColor" c_tsphe_setfillcolor ::+               Ptr RawTSPHE -> CInt -> IO () -foreign import ccall safe "HROOTGrafTSPHE.h TSPHE_SetFillStyle"-               c_tsphe_setfillstyle :: Ptr RawTSPHE -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTSPHE.h TSPHE_SetFillStyle" c_tsphe_setfillstyle ::+               Ptr RawTSPHE -> CInt -> IO () -foreign import ccall safe "HROOTGrafTSPHE.h TSPHE_Draw"+foreign import ccall interruptible "HROOTGrafTSPHE.h TSPHE_Clear"+               c_tsphe_clear :: Ptr RawTSPHE -> CString -> IO ()++foreign import ccall interruptible "HROOTGrafTSPHE.h TSPHE_Draw"                c_tsphe_draw :: Ptr RawTSPHE -> CString -> IO () -foreign import ccall safe "HROOTGrafTSPHE.h TSPHE_FindObject"-               c_tsphe_findobject ::+foreign import ccall interruptible+               "HROOTGrafTSPHE.h TSPHE_FindObject" c_tsphe_findobject ::                Ptr RawTSPHE -> CString -> IO (Ptr RawTObject) -foreign import ccall safe "HROOTGrafTSPHE.h TSPHE_GetName"+foreign import ccall interruptible "HROOTGrafTSPHE.h TSPHE_GetName"                c_tsphe_getname :: Ptr RawTSPHE -> IO CString -foreign import ccall safe "HROOTGrafTSPHE.h TSPHE_IsA" c_tsphe_isa-               :: Ptr RawTSPHE -> IO (Ptr RawTClass)+foreign import ccall interruptible "HROOTGrafTSPHE.h TSPHE_IsA"+               c_tsphe_isa :: Ptr RawTSPHE -> IO (Ptr RawTClass) -foreign import ccall safe "HROOTGrafTSPHE.h TSPHE_Paint"+foreign import ccall interruptible "HROOTGrafTSPHE.h TSPHE_Paint"                c_tsphe_paint :: Ptr RawTSPHE -> CString -> IO () -foreign import ccall safe "HROOTGrafTSPHE.h TSPHE_printObj"-               c_tsphe_printobj :: Ptr RawTSPHE -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTSPHE.h TSPHE_printObj" c_tsphe_printobj ::+               Ptr RawTSPHE -> CString -> IO () -foreign import ccall safe "HROOTGrafTSPHE.h TSPHE_SaveAs"+foreign import ccall interruptible "HROOTGrafTSPHE.h TSPHE_SaveAs"                c_tsphe_saveas :: Ptr RawTSPHE -> CString -> CString -> IO () -foreign import ccall safe "HROOTGrafTSPHE.h TSPHE_Write"+foreign import ccall interruptible "HROOTGrafTSPHE.h TSPHE_Write"                c_tsphe_write :: Ptr RawTSPHE -> CString -> CInt -> CInt -> IO CInt -foreign import ccall safe "HROOTGrafTSPHE.h TSPHE_delete"+foreign import ccall interruptible "HROOTGrafTSPHE.h TSPHE_Write_"+               c_tsphe_write_ :: Ptr RawTSPHE -> IO CInt++foreign import ccall interruptible "HROOTGrafTSPHE.h TSPHE_delete"                c_tsphe_delete :: Ptr RawTSPHE -> IO () -foreign import ccall safe "HROOTGrafTSPHE.h TSPHE_newTSPHE"-               c_tsphe_newtsphe ::+foreign import ccall interruptible+               "HROOTGrafTSPHE.h TSPHE_newTSPHE" c_tsphe_newtsphe ::                CString ->                  CString ->                    CString ->-                     CDouble ->-                       CDouble ->-                         CDouble -> CDouble -> CDouble -> CDouble -> IO (Ptr RawTSPHE)+                     CFloat ->+                       CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> IO (Ptr RawTSPHE)
src/HROOT/Graf/TSPHE/Implementation.hs view
@@ -1,17 +1,26 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances,   ForeignFunctionInterface, IncoherentInstances,-  MultiParamTypeClasses, OverlappingInstances, TypeFamilies,-  TypeSynonymInstances #-}+  MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+  TypeFamilies, TypeSynonymInstances #-} module HROOT.Graf.TSPHE.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Graf.TSPHE.RawType import HROOT.Graf.TSPHE.FFI import HROOT.Graf.TSPHE.Interface import HROOT.Graf.TSPHE.Cast+import HROOT.Graf.TSPHE.RawType+import HROOT.Graf.TSPHE.Cast+import HROOT.Graf.TSPHE.Interface import HROOT.Core.TClass.RawType import HROOT.Core.TClass.Cast import HROOT.Core.TClass.Interface@@ -33,20 +42,20 @@ import HROOT.Core.TObject.RawType import HROOT.Core.TObject.Cast import HROOT.Core.TObject.Interface-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Cast-import HROOT.Core.Deletable.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITSPHE TSPHE+instance () => ITSPHE (TSPHE) where -instance ITShape TSPHE+instance () => ITShape (TSPHE) where -instance ITNamed TSPHE where+instance () => ITNamed (TSPHE) where         setName = xform1 c_tsphe_setname         setNameTitle = xform2 c_tsphe_setnametitle         setTitle = xform1 c_tsphe_settitle -instance ITAttLine TSPHE where+instance () => ITAttLine (TSPHE) where         getLineColor = xform0 c_tsphe_getlinecolor         getLineStyle = xform0 c_tsphe_getlinestyle         getLineWidth = xform0 c_tsphe_getlinewidth@@ -56,13 +65,14 @@         setLineStyle = xform1 c_tsphe_setlinestyle         setLineWidth = xform1 c_tsphe_setlinewidth -instance ITAttFill TSPHE where+instance () => ITAttFill (TSPHE) where         setFillColor = xform1 c_tsphe_setfillcolor         setFillStyle = xform1 c_tsphe_setfillstyle -instance ITAtt3D TSPHE+instance () => ITAtt3D (TSPHE) where -instance ITObject TSPHE where+instance () => ITObject (TSPHE) where+        clear = xform1 c_tsphe_clear         draw = xform1 c_tsphe_draw         findObject = xform1 c_tsphe_findobject         getName = xform0 c_tsphe_getname@@ -71,8 +81,9 @@         printObj = xform1 c_tsphe_printobj         saveAs = xform2 c_tsphe_saveas         write = xform3 c_tsphe_write+        write_ = xform0 c_tsphe_write_ -instance IDeletable TSPHE where+instance () => IDeletable (TSPHE) where         delete = xform0 c_tsphe_delete  newTSPHE ::@@ -80,6 +91,6 @@            c0 ->              c1 ->                c2 ->-                 CDouble ->-                   CDouble -> CDouble -> CDouble -> CDouble -> CDouble -> IO TSPHE+                 CFloat ->+                   CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> IO TSPHE newTSPHE = xform8 c_tsphe_newtsphe
src/HROOT/Graf/TSPHE/Interface.hs view
@@ -4,13 +4,14 @@   TypeSynonymInstances #-} module HROOT.Graf.TSPHE.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Graf.TSPHE.RawType import HROOT.Graf.TShape.Interface -class ITShape a => ITSPHE a+class (ITShape a) => ITSPHE a where  upcastTSPHE :: forall a . (FPtr a, ITSPHE a) => a -> TSPHE upcastTSPHE h
src/HROOT/Graf/TSPHE/RawType.hs view
@@ -8,9 +8,9 @@ data RawTSPHE  newtype TSPHE = TSPHE (Ptr RawTSPHE)-              deriving (Eq, Ord, Show)+                  deriving (Eq, Ord, Show) -instance FPtr TSPHE where+instance () => FPtr (TSPHE) where         type Raw TSPHE = RawTSPHE         get_fptr (TSPHE ptr) = ptr         cast_fptr_to_obj = TSPHE
src/HROOT/Graf/TShape/Cast.hs view
@@ -8,10 +8,10 @@ import HROOT.Graf.TShape.RawType import HROOT.Graf.TShape.Interface -instance (ITShape a, FPtr a) => Castable a (Ptr RawTShape) where+instance (ITShape a, FPtr a) => Castable (a) (Ptr RawTShape) where         cast x f = f (castPtr (get_fptr x))         uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TShape (Ptr RawTShape) where+instance () => Castable (TShape) (Ptr RawTShape) where         cast x f = f (castPtr (get_fptr x))         uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Graf/TShape/FFI.hsc view
@@ -1,81 +1,106 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Graf.TShape.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Graf.TShape.RawType+import HROOT.Graf.TShape.RawType import HROOT.Core.TObject.RawType import HROOT.Core.TClass.RawType -foreign import ccall safe "HROOTGrafTShape.h TShape_SetName"-               c_tshape_setname :: Ptr RawTShape -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTShape.h TShape_SetName" c_tshape_setname ::+               Ptr RawTShape -> CString -> IO () -foreign import ccall safe "HROOTGrafTShape.h TShape_SetNameTitle"-               c_tshape_setnametitle ::+foreign import ccall interruptible+               "HROOTGrafTShape.h TShape_SetNameTitle" c_tshape_setnametitle ::                Ptr RawTShape -> CString -> CString -> IO () -foreign import ccall safe "HROOTGrafTShape.h TShape_SetTitle"-               c_tshape_settitle :: Ptr RawTShape -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTShape.h TShape_SetTitle" c_tshape_settitle ::+               Ptr RawTShape -> CString -> IO () -foreign import ccall safe "HROOTGrafTShape.h TShape_GetLineColor"-               c_tshape_getlinecolor :: Ptr RawTShape -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTShape.h TShape_GetLineColor" c_tshape_getlinecolor ::+               Ptr RawTShape -> IO CShort -foreign import ccall safe "HROOTGrafTShape.h TShape_GetLineStyle"-               c_tshape_getlinestyle :: Ptr RawTShape -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTShape.h TShape_GetLineStyle" c_tshape_getlinestyle ::+               Ptr RawTShape -> IO CShort -foreign import ccall safe "HROOTGrafTShape.h TShape_GetLineWidth"-               c_tshape_getlinewidth :: Ptr RawTShape -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTShape.h TShape_GetLineWidth" c_tshape_getlinewidth ::+               Ptr RawTShape -> IO CShort -foreign import ccall safe "HROOTGrafTShape.h TShape_ResetAttLine"-               c_tshape_resetattline :: Ptr RawTShape -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTShape.h TShape_ResetAttLine" c_tshape_resetattline ::+               Ptr RawTShape -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTShape.h TShape_SetLineAttributes"                c_tshape_setlineattributes :: Ptr RawTShape -> IO () -foreign import ccall safe "HROOTGrafTShape.h TShape_SetLineColor"-               c_tshape_setlinecolor :: Ptr RawTShape -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTShape.h TShape_SetLineColor" c_tshape_setlinecolor ::+               Ptr RawTShape -> CShort -> IO () -foreign import ccall safe "HROOTGrafTShape.h TShape_SetLineStyle"-               c_tshape_setlinestyle :: Ptr RawTShape -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTShape.h TShape_SetLineStyle" c_tshape_setlinestyle ::+               Ptr RawTShape -> CShort -> IO () -foreign import ccall safe "HROOTGrafTShape.h TShape_SetLineWidth"-               c_tshape_setlinewidth :: Ptr RawTShape -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTShape.h TShape_SetLineWidth" c_tshape_setlinewidth ::+               Ptr RawTShape -> CShort -> IO () -foreign import ccall safe "HROOTGrafTShape.h TShape_SetFillColor"-               c_tshape_setfillcolor :: Ptr RawTShape -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTShape.h TShape_SetFillColor" c_tshape_setfillcolor ::+               Ptr RawTShape -> CInt -> IO () -foreign import ccall safe "HROOTGrafTShape.h TShape_SetFillStyle"-               c_tshape_setfillstyle :: Ptr RawTShape -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTShape.h TShape_SetFillStyle" c_tshape_setfillstyle ::+               Ptr RawTShape -> CInt -> IO () -foreign import ccall safe "HROOTGrafTShape.h TShape_Draw"+foreign import ccall interruptible "HROOTGrafTShape.h TShape_Clear"+               c_tshape_clear :: Ptr RawTShape -> CString -> IO ()++foreign import ccall interruptible "HROOTGrafTShape.h TShape_Draw"                c_tshape_draw :: Ptr RawTShape -> CString -> IO () -foreign import ccall safe "HROOTGrafTShape.h TShape_FindObject"-               c_tshape_findobject ::+foreign import ccall interruptible+               "HROOTGrafTShape.h TShape_FindObject" c_tshape_findobject ::                Ptr RawTShape -> CString -> IO (Ptr RawTObject) -foreign import ccall safe "HROOTGrafTShape.h TShape_GetName"-               c_tshape_getname :: Ptr RawTShape -> IO CString+foreign import ccall interruptible+               "HROOTGrafTShape.h TShape_GetName" c_tshape_getname ::+               Ptr RawTShape -> IO CString -foreign import ccall safe "HROOTGrafTShape.h TShape_IsA"+foreign import ccall interruptible "HROOTGrafTShape.h TShape_IsA"                c_tshape_isa :: Ptr RawTShape -> IO (Ptr RawTClass) -foreign import ccall safe "HROOTGrafTShape.h TShape_Paint"+foreign import ccall interruptible "HROOTGrafTShape.h TShape_Paint"                c_tshape_paint :: Ptr RawTShape -> CString -> IO () -foreign import ccall safe "HROOTGrafTShape.h TShape_printObj"-               c_tshape_printobj :: Ptr RawTShape -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTShape.h TShape_printObj" c_tshape_printobj ::+               Ptr RawTShape -> CString -> IO () -foreign import ccall safe "HROOTGrafTShape.h TShape_SaveAs"-               c_tshape_saveas :: Ptr RawTShape -> CString -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTShape.h TShape_SaveAs" c_tshape_saveas ::+               Ptr RawTShape -> CString -> CString -> IO () -foreign import ccall safe "HROOTGrafTShape.h TShape_Write"+foreign import ccall interruptible "HROOTGrafTShape.h TShape_Write"                c_tshape_write ::                Ptr RawTShape -> CString -> CInt -> CInt -> IO CInt -foreign import ccall safe "HROOTGrafTShape.h TShape_delete"-               c_tshape_delete :: Ptr RawTShape -> IO ()+foreign import ccall interruptible+               "HROOTGrafTShape.h TShape_Write_" c_tshape_write_ ::+               Ptr RawTShape -> IO CInt -foreign import ccall safe "HROOTGrafTShape.h TShape_newTShape"-               c_tshape_newtshape ::+foreign import ccall interruptible+               "HROOTGrafTShape.h TShape_delete" c_tshape_delete ::+               Ptr RawTShape -> IO ()++foreign import ccall interruptible+               "HROOTGrafTShape.h TShape_newTShape" c_tshape_newtshape ::                CString -> CString -> CString -> IO (Ptr RawTShape)
src/HROOT/Graf/TShape/Implementation.hs view
@@ -1,17 +1,26 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances,   ForeignFunctionInterface, IncoherentInstances,-  MultiParamTypeClasses, OverlappingInstances, TypeFamilies,-  TypeSynonymInstances #-}+  MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+  TypeFamilies, TypeSynonymInstances #-} module HROOT.Graf.TShape.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Graf.TShape.RawType import HROOT.Graf.TShape.FFI import HROOT.Graf.TShape.Interface import HROOT.Graf.TShape.Cast+import HROOT.Graf.TShape.RawType+import HROOT.Graf.TShape.Cast+import HROOT.Graf.TShape.Interface import HROOT.Core.TClass.RawType import HROOT.Core.TClass.Cast import HROOT.Core.TClass.Interface@@ -30,18 +39,18 @@ import HROOT.Core.TObject.RawType import HROOT.Core.TObject.Cast import HROOT.Core.TObject.Interface-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Cast-import HROOT.Core.Deletable.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITShape TShape+instance () => ITShape (TShape) where -instance ITNamed TShape where+instance () => ITNamed (TShape) where         setName = xform1 c_tshape_setname         setNameTitle = xform2 c_tshape_setnametitle         setTitle = xform1 c_tshape_settitle -instance ITAttLine TShape where+instance () => ITAttLine (TShape) where         getLineColor = xform0 c_tshape_getlinecolor         getLineStyle = xform0 c_tshape_getlinestyle         getLineWidth = xform0 c_tshape_getlinewidth@@ -51,13 +60,14 @@         setLineStyle = xform1 c_tshape_setlinestyle         setLineWidth = xform1 c_tshape_setlinewidth -instance ITAttFill TShape where+instance () => ITAttFill (TShape) where         setFillColor = xform1 c_tshape_setfillcolor         setFillStyle = xform1 c_tshape_setfillstyle -instance ITAtt3D TShape+instance () => ITAtt3D (TShape) where -instance ITObject TShape where+instance () => ITObject (TShape) where+        clear = xform1 c_tshape_clear         draw = xform1 c_tshape_draw         findObject = xform1 c_tshape_findobject         getName = xform0 c_tshape_getname@@ -66,8 +76,9 @@         printObj = xform1 c_tshape_printobj         saveAs = xform2 c_tshape_saveas         write = xform3 c_tshape_write+        write_ = xform0 c_tshape_write_ -instance IDeletable TShape where+instance () => IDeletable (TShape) where         delete = xform0 c_tshape_delete  newTShape ::
src/HROOT/Graf/TShape/Interface.hs view
@@ -4,6 +4,7 @@   TypeSynonymInstances #-} module HROOT.Graf.TShape.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast@@ -14,6 +15,7 @@ import HROOT.Core.TAtt3D.Interface  class (ITNamed a, ITAttLine a, ITAttFill a, ITAtt3D a) => ITShape a+      where  upcastTShape :: forall a . (FPtr a, ITShape a) => a -> TShape upcastTShape h
src/HROOT/Graf/TShape/RawType.hs view
@@ -8,9 +8,9 @@ data RawTShape  newtype TShape = TShape (Ptr RawTShape)-               deriving (Eq, Ord, Show)+                   deriving (Eq, Ord, Show) -instance FPtr TShape where+instance () => FPtr (TShape) where         type Raw TShape = RawTShape         get_fptr (TShape ptr) = ptr         cast_fptr_to_obj = TShape
src/HROOT/Graf/TTUBE/Cast.hs view
@@ -8,10 +8,10 @@ import HROOT.Graf.TTUBE.RawType import HROOT.Graf.TTUBE.Interface -instance (ITTUBE a, FPtr a) => Castable a (Ptr RawTTUBE) where+instance (ITTUBE a, FPtr a) => Castable (a) (Ptr RawTTUBE) where         cast x f = f (castPtr (get_fptr x))         uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TTUBE (Ptr RawTTUBE) where+instance () => Castable (TTUBE) (Ptr RawTTUBE) where         cast x f = f (castPtr (get_fptr x))         uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Graf/TTUBE/FFI.hsc view
@@ -1,82 +1,103 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Graf.TTUBE.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Graf.TTUBE.RawType+import HROOT.Graf.TTUBE.RawType import HROOT.Core.TObject.RawType import HROOT.Core.TClass.RawType -foreign import ccall safe "HROOTGrafTTUBE.h TTUBE_SetName"+foreign import ccall interruptible "HROOTGrafTTUBE.h TTUBE_SetName"                c_ttube_setname :: Ptr RawTTUBE -> CString -> IO () -foreign import ccall safe "HROOTGrafTTUBE.h TTUBE_SetNameTitle"-               c_ttube_setnametitle :: Ptr RawTTUBE -> CString -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTTUBE.h TTUBE_SetNameTitle" c_ttube_setnametitle ::+               Ptr RawTTUBE -> CString -> CString -> IO () -foreign import ccall safe "HROOTGrafTTUBE.h TTUBE_SetTitle"-               c_ttube_settitle :: Ptr RawTTUBE -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTTUBE.h TTUBE_SetTitle" c_ttube_settitle ::+               Ptr RawTTUBE -> CString -> IO () -foreign import ccall safe "HROOTGrafTTUBE.h TTUBE_GetLineColor"-               c_ttube_getlinecolor :: Ptr RawTTUBE -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTTUBE.h TTUBE_GetLineColor" c_ttube_getlinecolor ::+               Ptr RawTTUBE -> IO CShort -foreign import ccall safe "HROOTGrafTTUBE.h TTUBE_GetLineStyle"-               c_ttube_getlinestyle :: Ptr RawTTUBE -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTTUBE.h TTUBE_GetLineStyle" c_ttube_getlinestyle ::+               Ptr RawTTUBE -> IO CShort -foreign import ccall safe "HROOTGrafTTUBE.h TTUBE_GetLineWidth"-               c_ttube_getlinewidth :: Ptr RawTTUBE -> IO CInt+foreign import ccall interruptible+               "HROOTGrafTTUBE.h TTUBE_GetLineWidth" c_ttube_getlinewidth ::+               Ptr RawTTUBE -> IO CShort -foreign import ccall safe "HROOTGrafTTUBE.h TTUBE_ResetAttLine"-               c_ttube_resetattline :: Ptr RawTTUBE -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTTUBE.h TTUBE_ResetAttLine" c_ttube_resetattline ::+               Ptr RawTTUBE -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible                "HROOTGrafTTUBE.h TTUBE_SetLineAttributes"                c_ttube_setlineattributes :: Ptr RawTTUBE -> IO () -foreign import ccall safe "HROOTGrafTTUBE.h TTUBE_SetLineColor"-               c_ttube_setlinecolor :: Ptr RawTTUBE -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTTUBE.h TTUBE_SetLineColor" c_ttube_setlinecolor ::+               Ptr RawTTUBE -> CShort -> IO () -foreign import ccall safe "HROOTGrafTTUBE.h TTUBE_SetLineStyle"-               c_ttube_setlinestyle :: Ptr RawTTUBE -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTTUBE.h TTUBE_SetLineStyle" c_ttube_setlinestyle ::+               Ptr RawTTUBE -> CShort -> IO () -foreign import ccall safe "HROOTGrafTTUBE.h TTUBE_SetLineWidth"-               c_ttube_setlinewidth :: Ptr RawTTUBE -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTTUBE.h TTUBE_SetLineWidth" c_ttube_setlinewidth ::+               Ptr RawTTUBE -> CShort -> IO () -foreign import ccall safe "HROOTGrafTTUBE.h TTUBE_SetFillColor"-               c_ttube_setfillcolor :: Ptr RawTTUBE -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTTUBE.h TTUBE_SetFillColor" c_ttube_setfillcolor ::+               Ptr RawTTUBE -> CInt -> IO () -foreign import ccall safe "HROOTGrafTTUBE.h TTUBE_SetFillStyle"-               c_ttube_setfillstyle :: Ptr RawTTUBE -> CInt -> IO ()+foreign import ccall interruptible+               "HROOTGrafTTUBE.h TTUBE_SetFillStyle" c_ttube_setfillstyle ::+               Ptr RawTTUBE -> CInt -> IO () -foreign import ccall safe "HROOTGrafTTUBE.h TTUBE_Draw"+foreign import ccall interruptible "HROOTGrafTTUBE.h TTUBE_Clear"+               c_ttube_clear :: Ptr RawTTUBE -> CString -> IO ()++foreign import ccall interruptible "HROOTGrafTTUBE.h TTUBE_Draw"                c_ttube_draw :: Ptr RawTTUBE -> CString -> IO () -foreign import ccall safe "HROOTGrafTTUBE.h TTUBE_FindObject"-               c_ttube_findobject ::+foreign import ccall interruptible+               "HROOTGrafTTUBE.h TTUBE_FindObject" c_ttube_findobject ::                Ptr RawTTUBE -> CString -> IO (Ptr RawTObject) -foreign import ccall safe "HROOTGrafTTUBE.h TTUBE_GetName"+foreign import ccall interruptible "HROOTGrafTTUBE.h TTUBE_GetName"                c_ttube_getname :: Ptr RawTTUBE -> IO CString -foreign import ccall safe "HROOTGrafTTUBE.h TTUBE_IsA" c_ttube_isa-               :: Ptr RawTTUBE -> IO (Ptr RawTClass)+foreign import ccall interruptible "HROOTGrafTTUBE.h TTUBE_IsA"+               c_ttube_isa :: Ptr RawTTUBE -> IO (Ptr RawTClass) -foreign import ccall safe "HROOTGrafTTUBE.h TTUBE_Paint"+foreign import ccall interruptible "HROOTGrafTTUBE.h TTUBE_Paint"                c_ttube_paint :: Ptr RawTTUBE -> CString -> IO () -foreign import ccall safe "HROOTGrafTTUBE.h TTUBE_printObj"-               c_ttube_printobj :: Ptr RawTTUBE -> CString -> IO ()+foreign import ccall interruptible+               "HROOTGrafTTUBE.h TTUBE_printObj" c_ttube_printobj ::+               Ptr RawTTUBE -> CString -> IO () -foreign import ccall safe "HROOTGrafTTUBE.h TTUBE_SaveAs"+foreign import ccall interruptible "HROOTGrafTTUBE.h TTUBE_SaveAs"                c_ttube_saveas :: Ptr RawTTUBE -> CString -> CString -> IO () -foreign import ccall safe "HROOTGrafTTUBE.h TTUBE_Write"+foreign import ccall interruptible "HROOTGrafTTUBE.h TTUBE_Write"                c_ttube_write :: Ptr RawTTUBE -> CString -> CInt -> CInt -> IO CInt -foreign import ccall safe "HROOTGrafTTUBE.h TTUBE_delete"+foreign import ccall interruptible "HROOTGrafTTUBE.h TTUBE_Write_"+               c_ttube_write_ :: Ptr RawTTUBE -> IO CInt++foreign import ccall interruptible "HROOTGrafTTUBE.h TTUBE_delete"                c_ttube_delete :: Ptr RawTTUBE -> IO () -foreign import ccall safe "HROOTGrafTTUBE.h TTUBE_newTTUBE"-               c_ttube_newttube ::+foreign import ccall interruptible+               "HROOTGrafTTUBE.h TTUBE_newTTUBE" c_ttube_newttube ::                CString ->                  CString ->                    CString ->-                     CDouble -> CDouble -> CDouble -> CDouble -> IO (Ptr RawTTUBE)+                     CFloat -> CFloat -> CFloat -> CFloat -> IO (Ptr RawTTUBE)
src/HROOT/Graf/TTUBE/Implementation.hs view
@@ -1,17 +1,26 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances,   ForeignFunctionInterface, IncoherentInstances,-  MultiParamTypeClasses, OverlappingInstances, TypeFamilies,-  TypeSynonymInstances #-}+  MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+  TypeFamilies, TypeSynonymInstances #-} module HROOT.Graf.TTUBE.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Graf.TTUBE.RawType import HROOT.Graf.TTUBE.FFI import HROOT.Graf.TTUBE.Interface import HROOT.Graf.TTUBE.Cast+import HROOT.Graf.TTUBE.RawType+import HROOT.Graf.TTUBE.Cast+import HROOT.Graf.TTUBE.Interface import HROOT.Core.TClass.RawType import HROOT.Core.TClass.Cast import HROOT.Core.TClass.Interface@@ -33,20 +42,20 @@ import HROOT.Core.TObject.RawType import HROOT.Core.TObject.Cast import HROOT.Core.TObject.Interface-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Cast-import HROOT.Core.Deletable.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITTUBE TTUBE+instance () => ITTUBE (TTUBE) where -instance ITShape TTUBE+instance () => ITShape (TTUBE) where -instance ITNamed TTUBE where+instance () => ITNamed (TTUBE) where         setName = xform1 c_ttube_setname         setNameTitle = xform2 c_ttube_setnametitle         setTitle = xform1 c_ttube_settitle -instance ITAttLine TTUBE where+instance () => ITAttLine (TTUBE) where         getLineColor = xform0 c_ttube_getlinecolor         getLineStyle = xform0 c_ttube_getlinestyle         getLineWidth = xform0 c_ttube_getlinewidth@@ -56,13 +65,14 @@         setLineStyle = xform1 c_ttube_setlinestyle         setLineWidth = xform1 c_ttube_setlinewidth -instance ITAttFill TTUBE where+instance () => ITAttFill (TTUBE) where         setFillColor = xform1 c_ttube_setfillcolor         setFillStyle = xform1 c_ttube_setfillstyle -instance ITAtt3D TTUBE+instance () => ITAtt3D (TTUBE) where -instance ITObject TTUBE where+instance () => ITObject (TTUBE) where+        clear = xform1 c_ttube_clear         draw = xform1 c_ttube_draw         findObject = xform1 c_ttube_findobject         getName = xform0 c_ttube_getname@@ -71,12 +81,12 @@         printObj = xform1 c_ttube_printobj         saveAs = xform2 c_ttube_saveas         write = xform3 c_ttube_write+        write_ = xform0 c_ttube_write_ -instance IDeletable TTUBE where+instance () => IDeletable (TTUBE) where         delete = xform0 c_ttube_delete  newTTUBE ::            (Castable c2 CString, Castable c1 CString, Castable c0 CString) =>-           c0 ->-             c1 -> c2 -> CDouble -> CDouble -> CDouble -> CDouble -> IO TTUBE+           c0 -> c1 -> c2 -> CFloat -> CFloat -> CFloat -> CFloat -> IO TTUBE newTTUBE = xform6 c_ttube_newttube
src/HROOT/Graf/TTUBE/Interface.hs view
@@ -4,13 +4,14 @@   TypeSynonymInstances #-} module HROOT.Graf.TTUBE.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Graf.TTUBE.RawType import HROOT.Graf.TShape.Interface -class ITShape a => ITTUBE a+class (ITShape a) => ITTUBE a where  upcastTTUBE :: forall a . (FPtr a, ITTUBE a) => a -> TTUBE upcastTTUBE h
src/HROOT/Graf/TTUBE/RawType.hs view
@@ -8,9 +8,9 @@ data RawTTUBE  newtype TTUBE = TTUBE (Ptr RawTTUBE)-              deriving (Eq, Ord, Show)+                  deriving (Eq, Ord, Show) -instance FPtr TTUBE where+instance () => FPtr (TTUBE) where         type Raw TTUBE = RawTTUBE         get_fptr (TTUBE ptr) = ptr         cast_fptr_to_obj = TTUBE
+ src/HROOT/Graf/TView.hs view
@@ -0,0 +1,5 @@+module HROOT.Graf.TView+       (TView(..), ITView(..), upcastTView, downcastTView) where+import HROOT.Graf.TView.RawType+import HROOT.Graf.TView.Interface+import HROOT.Graf.TView.Implementation
+ src/HROOT/Graf/TView/Cast.hs view
@@ -0,0 +1,17 @@+{-# LANGUAGE FlexibleInstances, FlexibleContexts, TypeFamilies,+  MultiParamTypeClasses, OverlappingInstances, IncoherentInstances+  #-}+module HROOT.Graf.TView.Cast where+import Foreign.Ptr+import FFICXX.Runtime.Cast+import System.IO.Unsafe+import HROOT.Graf.TView.RawType+import HROOT.Graf.TView.Interface++instance (ITView a, FPtr a) => Castable (a) (Ptr RawTView) where+        cast x f = f (castPtr (get_fptr x))+        uncast x f = f (cast_fptr_to_obj (castPtr x))++instance () => Castable (TView) (Ptr RawTView) where+        cast x f = f (castPtr (get_fptr x))+        uncast x f = f (cast_fptr_to_obj (castPtr x))
+ src/HROOT/Graf/TView/FFI.hsc view
@@ -0,0 +1,136 @@+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-}+module HROOT.Graf.TView.FFI where+import Data.Word+import Data.Int+import Foreign.C+import Foreign.Ptr+import HROOT.Graf.TView.RawType+import HROOT.Graf.TView.RawType+import HROOT.Core.TObject.RawType+import HROOT.Core.TClass.RawType+import HROOT.Core.TVirtualPad.RawType++foreign import ccall interruptible "HROOTGrafTView.h TView_Clear"+               c_tview_clear :: Ptr RawTView -> CString -> IO ()++foreign import ccall interruptible "HROOTGrafTView.h TView_Draw"+               c_tview_draw :: Ptr RawTView -> CString -> IO ()++foreign import ccall interruptible+               "HROOTGrafTView.h TView_FindObject" c_tview_findobject ::+               Ptr RawTView -> CString -> IO (Ptr RawTObject)++foreign import ccall interruptible "HROOTGrafTView.h TView_GetName"+               c_tview_getname :: Ptr RawTView -> IO CString++foreign import ccall interruptible "HROOTGrafTView.h TView_IsA"+               c_tview_isa :: Ptr RawTView -> IO (Ptr RawTClass)++foreign import ccall interruptible "HROOTGrafTView.h TView_Paint"+               c_tview_paint :: Ptr RawTView -> CString -> IO ()++foreign import ccall interruptible+               "HROOTGrafTView.h TView_printObj" c_tview_printobj ::+               Ptr RawTView -> CString -> IO ()++foreign import ccall interruptible "HROOTGrafTView.h TView_SaveAs"+               c_tview_saveas :: Ptr RawTView -> CString -> CString -> IO ()++foreign import ccall interruptible "HROOTGrafTView.h TView_Write"+               c_tview_write :: Ptr RawTView -> CString -> CInt -> CInt -> IO CInt++foreign import ccall interruptible "HROOTGrafTView.h TView_Write_"+               c_tview_write_ :: Ptr RawTView -> IO CInt++foreign import ccall interruptible+               "HROOTGrafTView.h TView_GetLineColor" c_tview_getlinecolor ::+               Ptr RawTView -> IO CShort++foreign import ccall interruptible+               "HROOTGrafTView.h TView_GetLineStyle" c_tview_getlinestyle ::+               Ptr RawTView -> IO CShort++foreign import ccall interruptible+               "HROOTGrafTView.h TView_GetLineWidth" c_tview_getlinewidth ::+               Ptr RawTView -> IO CShort++foreign import ccall interruptible+               "HROOTGrafTView.h TView_ResetAttLine" c_tview_resetattline ::+               Ptr RawTView -> CString -> IO ()++foreign import ccall interruptible+               "HROOTGrafTView.h TView_SetLineAttributes"+               c_tview_setlineattributes :: Ptr RawTView -> IO ()++foreign import ccall interruptible+               "HROOTGrafTView.h TView_SetLineColor" c_tview_setlinecolor ::+               Ptr RawTView -> CShort -> IO ()++foreign import ccall interruptible+               "HROOTGrafTView.h TView_SetLineStyle" c_tview_setlinestyle ::+               Ptr RawTView -> CShort -> IO ()++foreign import ccall interruptible+               "HROOTGrafTView.h TView_SetLineWidth" c_tview_setlinewidth ::+               Ptr RawTView -> CShort -> IO ()++foreign import ccall interruptible "HROOTGrafTView.h TView_delete"+               c_tview_delete :: Ptr RawTView -> IO ()++foreign import ccall interruptible "HROOTGrafTView.h TView_Front"+               c_tview_front :: Ptr RawTView -> IO ()++foreign import ccall interruptible+               "HROOTGrafTView.h TView_FrontView" c_tview_frontview ::+               Ptr RawTView -> Ptr RawTVirtualPad -> IO ()++foreign import ccall interruptible+               "HROOTGrafTView.h TView_GetLatitude" c_tview_getlatitude ::+               Ptr RawTView -> IO CDouble++foreign import ccall interruptible+               "HROOTGrafTView.h TView_GetLongitude" c_tview_getlongitude ::+               Ptr RawTView -> IO CDouble++foreign import ccall interruptible "HROOTGrafTView.h TView_GetPsi"+               c_tview_getpsi :: Ptr RawTView -> IO CDouble++foreign import ccall interruptible+               "HROOTGrafTView.h TView_IsViewChanged" c_tview_isviewchanged ::+               Ptr RawTView -> IO CBool++foreign import ccall interruptible+               "HROOTGrafTView.h TView_RotateView" c_tview_rotateview ::+               Ptr RawTView -> CDouble -> CDouble -> IO ()++foreign import ccall interruptible+               "HROOTGrafTView.h TView_SetLatitude" c_tview_setlatitude ::+               Ptr RawTView -> CDouble -> IO ()++foreign import ccall interruptible+               "HROOTGrafTView.h TView_SetLongitude" c_tview_setlongitude ::+               Ptr RawTView -> CDouble -> IO ()++foreign import ccall interruptible "HROOTGrafTView.h TView_SetPsi"+               c_tview_setpsi :: Ptr RawTView -> CDouble -> IO ()++foreign import ccall interruptible+               "HROOTGrafTView.h TView_SetView1" c_tview_setview1 ::+               Ptr RawTView -> CDouble -> CDouble -> CDouble -> Ptr CInt -> IO ()++foreign import ccall interruptible+               "HROOTGrafTView.h TView_SetViewChanged" c_tview_setviewchanged ::+               Ptr RawTView -> CBool -> IO ()++foreign import ccall interruptible "HROOTGrafTView.h TView_Side"+               c_tview_side :: Ptr RawTView -> IO ()++foreign import ccall interruptible+               "HROOTGrafTView.h TView_SideView" c_tview_sideview ::+               Ptr RawTView -> Ptr RawTVirtualPad -> IO ()++foreign import ccall interruptible "HROOTGrafTView.h TView_Top"+               c_tview_top :: Ptr RawTView -> IO ()++foreign import ccall interruptible "HROOTGrafTView.h TView_TopView"+               c_tview_topview :: Ptr RawTView -> Ptr RawTVirtualPad -> IO ()
+ src/HROOT/Graf/TView/Implementation.hs view
@@ -0,0 +1,81 @@+{-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances,+  ForeignFunctionInterface, IncoherentInstances,+  MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+  TypeFamilies, TypeSynonymInstances #-}+module HROOT.Graf.TView.Implementation where+import Data.Monoid+import Data.Word+import Data.Int+import Foreign.C+import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax+import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH+import HROOT.Graf.TView.RawType+import HROOT.Graf.TView.FFI+import HROOT.Graf.TView.Interface+import HROOT.Graf.TView.Cast+import HROOT.Graf.TView.RawType+import HROOT.Graf.TView.Cast+import HROOT.Graf.TView.Interface+import HROOT.Core.TClass.RawType+import HROOT.Core.TClass.Cast+import HROOT.Core.TClass.Interface+import HROOT.Core.TVirtualPad.RawType+import HROOT.Core.TVirtualPad.Cast+import HROOT.Core.TVirtualPad.Interface+import HROOT.Core.TObject.RawType+import HROOT.Core.TObject.Cast+import HROOT.Core.TObject.Interface+import HROOT.Core.TAttLine.RawType+import HROOT.Core.TAttLine.Cast+import HROOT.Core.TAttLine.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface++instance () => ITView (TView) where+        front = xform0 c_tview_front+        frontView = xform1 c_tview_frontview+        getLatitude = xform0 c_tview_getlatitude+        getLongitude = xform0 c_tview_getlongitude+        getPsi = xform0 c_tview_getpsi+        isViewChanged = xform0 c_tview_isviewchanged+        rotateView = xform2 c_tview_rotateview+        setLatitude = xform1 c_tview_setlatitude+        setLongitude = xform1 c_tview_setlongitude+        setPsi = xform1 c_tview_setpsi+        setView1 = xform4 c_tview_setview1+        setViewChanged = xform1 c_tview_setviewchanged+        side = xform0 c_tview_side+        sideView = xform1 c_tview_sideview+        top = xform0 c_tview_top+        topView = xform1 c_tview_topview++instance () => ITObject (TView) where+        clear = xform1 c_tview_clear+        draw = xform1 c_tview_draw+        findObject = xform1 c_tview_findobject+        getName = xform0 c_tview_getname+        isA = xform0 c_tview_isa+        paint = xform1 c_tview_paint+        printObj = xform1 c_tview_printobj+        saveAs = xform2 c_tview_saveas+        write = xform3 c_tview_write+        write_ = xform0 c_tview_write_++instance () => ITAttLine (TView) where+        getLineColor = xform0 c_tview_getlinecolor+        getLineStyle = xform0 c_tview_getlinestyle+        getLineWidth = xform0 c_tview_getlinewidth+        resetAttLine = xform1 c_tview_resetattline+        setLineAttributes = xform0 c_tview_setlineattributes+        setLineColor = xform1 c_tview_setlinecolor+        setLineStyle = xform1 c_tview_setlinestyle+        setLineWidth = xform1 c_tview_setlinewidth++instance () => IDeletable (TView) where+        delete = xform0 c_tview_delete
+ src/HROOT/Graf/TView/Interface.hs view
@@ -0,0 +1,60 @@+{-# 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 h+  = let fh = get_fptr h+        fh2 :: Ptr RawTView = castPtr fh+      in cast_fptr_to_obj fh2++downcastTView :: forall a . (FPtr a, ITView a) => TView -> a+downcastTView h+  = let fh = get_fptr h+        fh2 = castPtr fh+      in cast_fptr_to_obj fh2
+ src/HROOT/Graf/TView/RawType.hs view
@@ -0,0 +1,16 @@+{-# LANGUAGE ForeignFunctionInterface, TypeFamilies,+  MultiParamTypeClasses, FlexibleInstances, TypeSynonymInstances,+  EmptyDataDecls, ExistentialQuantification, ScopedTypeVariables #-}+module HROOT.Graf.TView.RawType where+import Foreign.Ptr+import FFICXX.Runtime.Cast++data RawTView++newtype TView = TView (Ptr RawTView)+                  deriving (Eq, Ord, Show)++instance () => FPtr (TView) where+        type Raw TView = RawTView+        get_fptr (TView ptr) = ptr+        cast_fptr_to_obj = TView
+ src/HROOT/Graf/TView3D.hs view
@@ -0,0 +1,5 @@+module HROOT.Graf.TView3D+       (TView3D(..), ITView3D, upcastTView3D, downcastTView3D) where+import HROOT.Graf.TView3D.RawType+import HROOT.Graf.TView3D.Interface+import HROOT.Graf.TView3D.Implementation
+ src/HROOT/Graf/TView3D/Cast.hs view
@@ -0,0 +1,18 @@+{-# LANGUAGE FlexibleInstances, FlexibleContexts, TypeFamilies,+  MultiParamTypeClasses, OverlappingInstances, IncoherentInstances+  #-}+module HROOT.Graf.TView3D.Cast where+import Foreign.Ptr+import FFICXX.Runtime.Cast+import System.IO.Unsafe+import HROOT.Graf.TView3D.RawType+import HROOT.Graf.TView3D.Interface++instance (ITView3D a, FPtr a) => Castable (a) (Ptr RawTView3D)+         where+        cast x f = f (castPtr (get_fptr x))+        uncast x f = f (cast_fptr_to_obj (castPtr x))++instance () => Castable (TView3D) (Ptr RawTView3D) where+        cast x f = f (castPtr (get_fptr x))+        uncast x f = f (cast_fptr_to_obj (castPtr x))
+ src/HROOT/Graf/TView3D/FFI.hsc view
@@ -0,0 +1,150 @@+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-}+module HROOT.Graf.TView3D.FFI where+import Data.Word+import Data.Int+import Foreign.C+import Foreign.Ptr+import HROOT.Graf.TView3D.RawType+import HROOT.Graf.TView3D.RawType+import HROOT.Core.TVirtualPad.RawType+import HROOT.Core.TObject.RawType+import HROOT.Core.TClass.RawType++foreign import ccall interruptible+               "HROOTGrafTView3D.h TView3D_Front" c_tview3d_front ::+               Ptr RawTView3D -> IO ()++foreign import ccall interruptible+               "HROOTGrafTView3D.h TView3D_FrontView" c_tview3d_frontview ::+               Ptr RawTView3D -> Ptr RawTVirtualPad -> IO ()++foreign import ccall interruptible+               "HROOTGrafTView3D.h TView3D_GetLatitude" c_tview3d_getlatitude ::+               Ptr RawTView3D -> IO CDouble++foreign import ccall interruptible+               "HROOTGrafTView3D.h TView3D_GetLongitude" c_tview3d_getlongitude ::+               Ptr RawTView3D -> IO CDouble++foreign import ccall interruptible+               "HROOTGrafTView3D.h TView3D_GetPsi" c_tview3d_getpsi ::+               Ptr RawTView3D -> IO CDouble++foreign import ccall interruptible+               "HROOTGrafTView3D.h TView3D_IsViewChanged" c_tview3d_isviewchanged+               :: Ptr RawTView3D -> IO CBool++foreign import ccall interruptible+               "HROOTGrafTView3D.h TView3D_RotateView" c_tview3d_rotateview ::+               Ptr RawTView3D -> CDouble -> CDouble -> IO ()++foreign import ccall interruptible+               "HROOTGrafTView3D.h TView3D_SetLatitude" c_tview3d_setlatitude ::+               Ptr RawTView3D -> CDouble -> IO ()++foreign import ccall interruptible+               "HROOTGrafTView3D.h TView3D_SetLongitude" c_tview3d_setlongitude ::+               Ptr RawTView3D -> CDouble -> IO ()++foreign import ccall interruptible+               "HROOTGrafTView3D.h TView3D_SetPsi" c_tview3d_setpsi ::+               Ptr RawTView3D -> CDouble -> IO ()++foreign import ccall interruptible+               "HROOTGrafTView3D.h TView3D_SetView1" c_tview3d_setview1 ::+               Ptr RawTView3D ->+                 CDouble -> CDouble -> CDouble -> Ptr CInt -> IO ()++foreign import ccall interruptible+               "HROOTGrafTView3D.h TView3D_SetViewChanged"+               c_tview3d_setviewchanged :: Ptr RawTView3D -> CBool -> IO ()++foreign import ccall interruptible+               "HROOTGrafTView3D.h TView3D_Side" c_tview3d_side ::+               Ptr RawTView3D -> IO ()++foreign import ccall interruptible+               "HROOTGrafTView3D.h TView3D_SideView" c_tview3d_sideview ::+               Ptr RawTView3D -> Ptr RawTVirtualPad -> IO ()++foreign import ccall interruptible "HROOTGrafTView3D.h TView3D_Top"+               c_tview3d_top :: Ptr RawTView3D -> IO ()++foreign import ccall interruptible+               "HROOTGrafTView3D.h TView3D_TopView" c_tview3d_topview ::+               Ptr RawTView3D -> Ptr RawTVirtualPad -> IO ()++foreign import ccall interruptible+               "HROOTGrafTView3D.h TView3D_Clear" c_tview3d_clear ::+               Ptr RawTView3D -> CString -> IO ()++foreign import ccall interruptible+               "HROOTGrafTView3D.h TView3D_Draw" c_tview3d_draw ::+               Ptr RawTView3D -> CString -> IO ()++foreign import ccall interruptible+               "HROOTGrafTView3D.h TView3D_FindObject" c_tview3d_findobject ::+               Ptr RawTView3D -> CString -> IO (Ptr RawTObject)++foreign import ccall interruptible+               "HROOTGrafTView3D.h TView3D_GetName" c_tview3d_getname ::+               Ptr RawTView3D -> IO CString++foreign import ccall interruptible "HROOTGrafTView3D.h TView3D_IsA"+               c_tview3d_isa :: Ptr RawTView3D -> IO (Ptr RawTClass)++foreign import ccall interruptible+               "HROOTGrafTView3D.h TView3D_Paint" c_tview3d_paint ::+               Ptr RawTView3D -> CString -> IO ()++foreign import ccall interruptible+               "HROOTGrafTView3D.h TView3D_printObj" c_tview3d_printobj ::+               Ptr RawTView3D -> CString -> IO ()++foreign import ccall interruptible+               "HROOTGrafTView3D.h TView3D_SaveAs" c_tview3d_saveas ::+               Ptr RawTView3D -> CString -> CString -> IO ()++foreign import ccall interruptible+               "HROOTGrafTView3D.h TView3D_Write" c_tview3d_write ::+               Ptr RawTView3D -> CString -> CInt -> CInt -> IO CInt++foreign import ccall interruptible+               "HROOTGrafTView3D.h TView3D_Write_" c_tview3d_write_ ::+               Ptr RawTView3D -> IO CInt++foreign import ccall interruptible+               "HROOTGrafTView3D.h TView3D_GetLineColor" c_tview3d_getlinecolor ::+               Ptr RawTView3D -> IO CShort++foreign import ccall interruptible+               "HROOTGrafTView3D.h TView3D_GetLineStyle" c_tview3d_getlinestyle ::+               Ptr RawTView3D -> IO CShort++foreign import ccall interruptible+               "HROOTGrafTView3D.h TView3D_GetLineWidth" c_tview3d_getlinewidth ::+               Ptr RawTView3D -> IO CShort++foreign import ccall interruptible+               "HROOTGrafTView3D.h TView3D_ResetAttLine" c_tview3d_resetattline ::+               Ptr RawTView3D -> CString -> IO ()++foreign import ccall interruptible+               "HROOTGrafTView3D.h TView3D_SetLineAttributes"+               c_tview3d_setlineattributes :: Ptr RawTView3D -> IO ()++foreign import ccall interruptible+               "HROOTGrafTView3D.h TView3D_SetLineColor" c_tview3d_setlinecolor ::+               Ptr RawTView3D -> CShort -> IO ()++foreign import ccall interruptible+               "HROOTGrafTView3D.h TView3D_SetLineStyle" c_tview3d_setlinestyle ::+               Ptr RawTView3D -> CShort -> IO ()++foreign import ccall interruptible+               "HROOTGrafTView3D.h TView3D_SetLineWidth" c_tview3d_setlinewidth ::+               Ptr RawTView3D -> CShort -> IO ()++foreign import ccall interruptible+               "HROOTGrafTView3D.h TView3D_delete" c_tview3d_delete ::+               Ptr RawTView3D -> IO ()
+ src/HROOT/Graf/TView3D/Implementation.hs view
@@ -0,0 +1,86 @@+{-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances,+  ForeignFunctionInterface, IncoherentInstances,+  MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+  TypeFamilies, TypeSynonymInstances #-}+module HROOT.Graf.TView3D.Implementation where+import Data.Monoid+import Data.Word+import Data.Int+import Foreign.C+import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax+import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH+import HROOT.Graf.TView3D.RawType+import HROOT.Graf.TView3D.FFI+import HROOT.Graf.TView3D.Interface+import HROOT.Graf.TView3D.Cast+import HROOT.Graf.TView3D.RawType+import HROOT.Graf.TView3D.Cast+import HROOT.Graf.TView3D.Interface+import HROOT.Core.TVirtualPad.RawType+import HROOT.Core.TVirtualPad.Cast+import HROOT.Core.TVirtualPad.Interface+import HROOT.Core.TClass.RawType+import HROOT.Core.TClass.Cast+import HROOT.Core.TClass.Interface+import HROOT.Graf.TView.RawType+import HROOT.Graf.TView.Cast+import HROOT.Graf.TView.Interface+import HROOT.Core.TObject.RawType+import HROOT.Core.TObject.Cast+import HROOT.Core.TObject.Interface+import HROOT.Core.TAttLine.RawType+import HROOT.Core.TAttLine.Cast+import HROOT.Core.TAttLine.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface++instance () => ITView3D (TView3D) where++instance () => ITView (TView3D) where+        front = xform0 c_tview3d_front+        frontView = xform1 c_tview3d_frontview+        getLatitude = xform0 c_tview3d_getlatitude+        getLongitude = xform0 c_tview3d_getlongitude+        getPsi = xform0 c_tview3d_getpsi+        isViewChanged = xform0 c_tview3d_isviewchanged+        rotateView = xform2 c_tview3d_rotateview+        setLatitude = xform1 c_tview3d_setlatitude+        setLongitude = xform1 c_tview3d_setlongitude+        setPsi = xform1 c_tview3d_setpsi+        setView1 = xform4 c_tview3d_setview1+        setViewChanged = xform1 c_tview3d_setviewchanged+        side = xform0 c_tview3d_side+        sideView = xform1 c_tview3d_sideview+        top = xform0 c_tview3d_top+        topView = xform1 c_tview3d_topview++instance () => ITObject (TView3D) where+        clear = xform1 c_tview3d_clear+        draw = xform1 c_tview3d_draw+        findObject = xform1 c_tview3d_findobject+        getName = xform0 c_tview3d_getname+        isA = xform0 c_tview3d_isa+        paint = xform1 c_tview3d_paint+        printObj = xform1 c_tview3d_printobj+        saveAs = xform2 c_tview3d_saveas+        write = xform3 c_tview3d_write+        write_ = xform0 c_tview3d_write_++instance () => ITAttLine (TView3D) where+        getLineColor = xform0 c_tview3d_getlinecolor+        getLineStyle = xform0 c_tview3d_getlinestyle+        getLineWidth = xform0 c_tview3d_getlinewidth+        resetAttLine = xform1 c_tview3d_resetattline+        setLineAttributes = xform0 c_tview3d_setlineattributes+        setLineColor = xform1 c_tview3d_setlinecolor+        setLineStyle = xform1 c_tview3d_setlinestyle+        setLineWidth = xform1 c_tview3d_setlinewidth++instance () => IDeletable (TView3D) where+        delete = xform0 c_tview3d_delete
+ src/HROOT/Graf/TView3D/Interface.hs view
@@ -0,0 +1,26 @@+{-# LANGUAGE EmptyDataDecls, ExistentialQuantification,+  FlexibleContexts, FlexibleInstances, ForeignFunctionInterface,+  MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies,+  TypeSynonymInstances #-}+module HROOT.Graf.TView3D.Interface where+import Data.Word+import Data.Int+import Foreign.C+import Foreign.Ptr+import FFICXX.Runtime.Cast+import HROOT.Graf.TView3D.RawType+import HROOT.Graf.TView.Interface++class (ITView a) => ITView3D a where++upcastTView3D :: forall a . (FPtr a, ITView3D a) => a -> TView3D+upcastTView3D h+  = let fh = get_fptr h+        fh2 :: Ptr RawTView3D = castPtr fh+      in cast_fptr_to_obj fh2++downcastTView3D :: forall a . (FPtr a, ITView3D a) => TView3D -> a+downcastTView3D h+  = let fh = get_fptr h+        fh2 = castPtr fh+      in cast_fptr_to_obj fh2
+ src/HROOT/Graf/TView3D/RawType.hs view
@@ -0,0 +1,16 @@+{-# LANGUAGE ForeignFunctionInterface, TypeFamilies,+  MultiParamTypeClasses, FlexibleInstances, TypeSynonymInstances,+  EmptyDataDecls, ExistentialQuantification, ScopedTypeVariables #-}+module HROOT.Graf.TView3D.RawType where+import Foreign.Ptr+import FFICXX.Runtime.Cast++data RawTView3D++newtype TView3D = TView3D (Ptr RawTView3D)+                    deriving (Eq, Ord, Show)++instance () => FPtr (TView3D) where+        type Raw TView3D = RawTView3D+        get_fptr (TView3D ptr) = ptr+        cast_fptr_to_obj = TView3D
+ src/HROOT/Graf/Template.hs view
@@ -0,0 +1,7 @@+{-# LANGUAGE EmptyDataDecls, FlexibleInstances,+  ForeignFunctionInterface, InterruptibleFFI, MultiParamTypeClasses,+  TypeFamilies #-}+module HROOT.Graf.Template () where+import Foreign.C.Types+import Foreign.Ptr+import FFICXX.Runtime.Cast