-- GENERATED by C->Haskell Compiler, version 0.16.3 Crystal Seed, 24 Jan 2009 (Haskell) -- Edit the ORIGNAL .chs file instead! {-# LINE 1 ".\\HGamer3D\\Bindings\\SFML\\ClassSoundSource.chs" #-}{-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE TypeSynonymInstances #-} -- This source file is part of HGamer3D -- (A project to enable 3D game development in Haskell) -- For the latest info, see http://www.althainz.de/HGamer3D.html -- -- (c) 2011, 2012 Peter Althainz -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- -- ClassSoundSource.chs -- module HGamer3D.Bindings.SFML.ClassSoundSource where import Foreign import Foreign.Ptr import Foreign.C import HGamer3D.Data.HG3DClass import HGamer3D.Data.Vector import HGamer3D.Data.Colour import HGamer3D.Data.Angle import HGamer3D.Bindings.SFML.Utils {-# LINE 40 ".\\HGamer3D\\Bindings\\SFML\\ClassSoundSource.chs" #-} import HGamer3D.Bindings.SFML.ClassPtr {-# LINE 41 ".\\HGamer3D\\Bindings\\SFML\\ClassSoundSource.chs" #-} import HGamer3D.Bindings.SFML.StructHG3DClass {-# LINE 42 ".\\HGamer3D\\Bindings\\SFML\\ClassSoundSource.chs" #-} import HGamer3D.Bindings.SFML.StructVec3 {-# LINE 43 ".\\HGamer3D\\Bindings\\SFML\\ClassSoundSource.chs" #-} {- function ~SoundSource -} delete :: HG3DClass -> IO () delete a1 = withHG3DClass a1 $ \a1' -> delete'_ a1' >>= \res -> return () {-# LINE 48 ".\\HGamer3D\\Bindings\\SFML\\ClassSoundSource.chs" #-} {- function setPitch -} setPitch :: HG3DClass -> Float -> IO () setPitch a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = realToFrac a2} in setPitch'_ a1' a2' >>= \res -> return () {-# LINE 53 ".\\HGamer3D\\Bindings\\SFML\\ClassSoundSource.chs" #-} {- function setVolume -} setVolume :: HG3DClass -> Float -> IO () setVolume a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = realToFrac a2} in setVolume'_ a1' a2' >>= \res -> return () {-# LINE 58 ".\\HGamer3D\\Bindings\\SFML\\ClassSoundSource.chs" #-} {- function setPosition -} setPosition :: HG3DClass -> Float -> Float -> Float -> IO () setPosition a1 a2 a3 a4 = withHG3DClass a1 $ \a1' -> let {a2' = realToFrac a2} in let {a3' = realToFrac a3} in let {a4' = realToFrac a4} in setPosition'_ a1' a2' a3' a4' >>= \res -> return () {-# LINE 65 ".\\HGamer3D\\Bindings\\SFML\\ClassSoundSource.chs" #-} {- function setRelativeToListener -} setRelativeToListener :: HG3DClass -> Bool -> IO () setRelativeToListener a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = fromBool a2} in setRelativeToListener'_ a1' a2' >>= \res -> return () {-# LINE 70 ".\\HGamer3D\\Bindings\\SFML\\ClassSoundSource.chs" #-} {- function setMinDistance -} setMinDistance :: HG3DClass -> Float -> IO () setMinDistance a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = realToFrac a2} in setMinDistance'_ a1' a2' >>= \res -> return () {-# LINE 75 ".\\HGamer3D\\Bindings\\SFML\\ClassSoundSource.chs" #-} {- function setAttenuation -} setAttenuation :: HG3DClass -> Float -> IO () setAttenuation a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = realToFrac a2} in setAttenuation'_ a1' a2' >>= \res -> return () {-# LINE 80 ".\\HGamer3D\\Bindings\\SFML\\ClassSoundSource.chs" #-} {- function getPitch -} getPitch :: HG3DClass -> IO (Float) getPitch a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getPitch'_ a1' a2' >>= \res -> peekFloatConv a2'>>= \a2'' -> return (a2'') {-# LINE 85 ".\\HGamer3D\\Bindings\\SFML\\ClassSoundSource.chs" #-} {- function getVolume -} getVolume :: HG3DClass -> IO (Float) getVolume a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getVolume'_ a1' a2' >>= \res -> peekFloatConv a2'>>= \a2'' -> return (a2'') {-# LINE 90 ".\\HGamer3D\\Bindings\\SFML\\ClassSoundSource.chs" #-} {- function getPosition -} getPosition :: HG3DClass -> IO (Vec3) getPosition a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getPosition'_ a1' a2' >>= \res -> peekVec3 a2'>>= \a2'' -> return (a2'') {-# LINE 95 ".\\HGamer3D\\Bindings\\SFML\\ClassSoundSource.chs" #-} {- function isRelativeToListener -} isRelativeToListener :: HG3DClass -> IO (Bool) isRelativeToListener a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> isRelativeToListener'_ a1' a2' >>= \res -> peekBoolUtil a2'>>= \a2'' -> return (a2'') {-# LINE 100 ".\\HGamer3D\\Bindings\\SFML\\ClassSoundSource.chs" #-} {- function getMinDistance -} getMinDistance :: HG3DClass -> IO (Float) getMinDistance a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getMinDistance'_ a1' a2' >>= \res -> peekFloatConv a2'>>= \a2'' -> return (a2'') {-# LINE 105 ".\\HGamer3D\\Bindings\\SFML\\ClassSoundSource.chs" #-} {- function getAttenuation -} getAttenuation :: HG3DClass -> IO (Float) getAttenuation a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getAttenuation'_ a1' a2' >>= \res -> peekFloatConv a2'>>= \a2'' -> return (a2'') {-# LINE 110 ".\\HGamer3D\\Bindings\\SFML\\ClassSoundSource.chs" #-} foreign import ccall safe "HGamer3D\\Bindings\\SFML\\ClassSoundSource.chs.h sfml_snsr_destruct" delete'_ :: ((HG3DClassPtr) -> (IO ())) foreign import ccall safe "HGamer3D\\Bindings\\SFML\\ClassSoundSource.chs.h sfml_snsr_setPitch" setPitch'_ :: ((HG3DClassPtr) -> (CFloat -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\SFML\\ClassSoundSource.chs.h sfml_snsr_setVolume" setVolume'_ :: ((HG3DClassPtr) -> (CFloat -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\SFML\\ClassSoundSource.chs.h sfml_snsr_setPosition" setPosition'_ :: ((HG3DClassPtr) -> (CFloat -> (CFloat -> (CFloat -> (IO ()))))) foreign import ccall safe "HGamer3D\\Bindings\\SFML\\ClassSoundSource.chs.h sfml_snsr_setRelativeToListener" setRelativeToListener'_ :: ((HG3DClassPtr) -> (CInt -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\SFML\\ClassSoundSource.chs.h sfml_snsr_setMinDistance" setMinDistance'_ :: ((HG3DClassPtr) -> (CFloat -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\SFML\\ClassSoundSource.chs.h sfml_snsr_setAttenuation" setAttenuation'_ :: ((HG3DClassPtr) -> (CFloat -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\SFML\\ClassSoundSource.chs.h sfml_snsr_getPitch" getPitch'_ :: ((HG3DClassPtr) -> ((Ptr CFloat) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\SFML\\ClassSoundSource.chs.h sfml_snsr_getVolume" getVolume'_ :: ((HG3DClassPtr) -> ((Ptr CFloat) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\SFML\\ClassSoundSource.chs.h sfml_snsr_getPosition" getPosition'_ :: ((HG3DClassPtr) -> ((Vec3Ptr) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\SFML\\ClassSoundSource.chs.h sfml_snsr_isRelativeToListener" isRelativeToListener'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\SFML\\ClassSoundSource.chs.h sfml_snsr_getMinDistance" getMinDistance'_ :: ((HG3DClassPtr) -> ((Ptr CFloat) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\SFML\\ClassSoundSource.chs.h sfml_snsr_getAttenuation" getAttenuation'_ :: ((HG3DClassPtr) -> ((Ptr CFloat) -> (IO ())))