1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
--------------------------------------------------------------------------------
-- |
-- Module : Sound.ALUT.Version
-- Copyright : (c) Sven Panne 2005-2009
-- License : BSD-style (see the file LICENSE)
--
-- Maintainer : sven.panne@aedion.de
-- Stability : stable
-- Portability : portable
--
--------------------------------------------------------------------------------
module Sound.ALUT.Version (
alutAPIVersion, alutVersion
) where
import Control.Monad ( liftM2 )
import Data.StateVar
import Sound.OpenAL.AL.BasicTypes ( ALint )
import Sound.ALUT.Config ( alut_GetMajorVersion, alut_GetMinorVersion )
import Sound.ALUT.Constants ( alut_API_MAJOR_VERSION, alut_API_MINOR_VERSION )
--------------------------------------------------------------------------------
alutAPIVersion :: String
alutAPIVersion = makeVersionString alut_API_MAJOR_VERSION alut_API_MINOR_VERSION
makeVersionString :: ALint -> ALint -> String
makeVersionString major minor = show major ++ "." ++ show minor
--------------------------------------------------------------------------------
alutVersion :: GettableStateVar String
alutVersion =
makeGettableStateVar $
liftM2 makeVersionString alut_GetMajorVersion alut_GetMinorVersion
|