cairo 0.12.1 → 0.12.2
raw patch · 4 files changed
+21/−8 lines, 4 files
Files
- Graphics/Rendering/Cairo/Types.chs +9/−0
- Gtk2HsSetup.hs +8/−5
- SetupMain.hs +3/−2
- cairo.cabal +1/−1
Graphics/Rendering/Cairo/Types.chs view
@@ -348,29 +348,38 @@ -- Marshalling functions +{-# INLINE cIntConv #-} cIntConv :: (Integral a, Integral b) => a -> b cIntConv = fromIntegral +{-# INLINE cFloatConv #-} cFloatConv :: (RealFloat a, RealFloat b) => a -> b cFloatConv = realToFrac +{-# INLINE cFromBool #-} cFromBool :: Num a => Bool -> a cFromBool = fromBool +{-# INLINE cToBool #-} cToBool :: Num a => a -> Bool cToBool = toBool +{-# INLINE cToEnum #-} cToEnum :: (Integral i, Enum e) => i -> e cToEnum = toEnum . cIntConv +{-# INLINE cFromEnum #-} cFromEnum :: (Enum e, Integral i) => e -> i cFromEnum = cIntConv . fromEnum +{-# INLINE peekFloatConv #-} peekFloatConv :: (Storable a, RealFloat a, RealFloat b) => Ptr a -> IO b peekFloatConv = liftM cFloatConv . peek +{-# INLINE withFloatConv #-} withFloatConv :: (Storable b, RealFloat a, RealFloat b) => a -> (Ptr b -> IO c) -> IO c withFloatConv = with . cFloatConv +{-# INLINE withArrayFloatConv #-} withArrayFloatConv :: (Storable b, RealFloat a, RealFloat b) => [a] -> (Ptr b -> IO b1) -> IO b1 withArrayFloatConv = withArray . map (cFloatConv)
Gtk2HsSetup.hs view
@@ -9,7 +9,10 @@ module Gtk2HsSetup ( gtk2hsUserHooks, getPkgConfigPackages, - checkGtk2hsBuildtools+ checkGtk2hsBuildtools,+ typeGenProgram,+ signalGenProgram,+ c2hsLocal ) where import Distribution.Simple@@ -411,11 +414,11 @@ (out',visited') = foldl visit (out, m `S.insert` visited) (mdRequires md) -- Check user whether install gtk2hs-buildtools correctly.-checkGtk2hsBuildtools :: [String] -> IO ()+checkGtk2hsBuildtools :: [Program] -> IO () checkGtk2hsBuildtools programs = do- programInfos <- mapM (\ name -> do- location <- programFindLocation (simpleProgram name) normal- return (name, location)+ programInfos <- mapM (\ prog -> do+ location <- programFindLocation prog normal+ return (programName prog, location) ) programs let printError name = do putStrLn $ "Cannot find " ++ name ++ "\n"
SetupMain.hs view
@@ -3,10 +3,11 @@ -- all Gtk2Hs-specific boilerplate is kept in Gtk2HsSetup.hs -- which should be kept identical across all packages. ---import Gtk2HsSetup ( gtk2hsUserHooks, checkGtk2hsBuildtools )+import Gtk2HsSetup ( gtk2hsUserHooks, checkGtk2hsBuildtools,+ typeGenProgram, signalGenProgram, c2hsLocal) import Distribution.Simple ( defaultMainWithHooks ) main = do- checkGtk2hsBuildtools ["gtk2hsC2hs"]+ checkGtk2hsBuildtools [c2hsLocal] defaultMainWithHooks gtk2hsUserHooks
cairo.cabal view
@@ -1,5 +1,5 @@ Name: cairo-Version: 0.12.1+Version: 0.12.2 License: BSD3 License-file: COPYRIGHT Copyright: (c) 2001-2010 The Gtk2Hs Team, (c) Paolo Martini 2005, (c) Abraham Egnor 2003, 2004, (c) Aetion Technologies LLC 2004