-- 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\\OIS\\ClassSystem.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 -- -- Copyright 2011 Dr. 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. -- -- ClassSystem.chs -- -- -- -- -- File for type, method, enum or function stubs -- in: "Module-OIS\oisb\include\OISBSystem.h" -- -- each stub combines the following files: -- a C++ implementation file, transforming cpp calls into C-functions -- a C-header file, making this C-functions available for the C2HS parser -- a chs file, give instructions to the C2HS parser. -- -- module HGamer3D.Bindings.OIS.ClassSystem where import C2HS import Foreign import Foreign.Ptr import Foreign.C import Monad (liftM, liftM2) import HGamer3D.Data.HG3DClass import HGamer3D.Data.Vector2 import HGamer3D.Data.Vector3 import HGamer3D.Data.Vector4 import HGamer3D.Data.Quaternion import HGamer3D.Data.ColourValue import HGamer3D.Data.Radian import HGamer3D.Data.Degree import HGamer3D.Data.Angle import HGamer3D.Bindings.OIS.TypeHG3DClass {-# LINE 54 "HGamer3D\\Bindings\\OIS\\ClassSystem.chs" #-} import HGamer3D.Bindings.OIS.ClassPtr {-# LINE 55 "HGamer3D\\Bindings\\OIS\\ClassSystem.chs" #-} import HGamer3D.Bindings.OIS.Utils {-# LINE 56 "HGamer3D\\Bindings\\OIS\\ClassSystem.chs" #-} cSyFinalize :: HG3DClass -> IO () cSyFinalize a1 = withHG3DClass a1 $ \a1' -> cSyFinalize'_ a1' >>= \res -> return () {-# LINE 61 "HGamer3D\\Bindings\\OIS\\ClassSystem.chs" #-} ; cSyProcess :: HG3DClass -> Float -> IO () cSyProcess a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = realToFrac a2} in cSyProcess'_ a1' a2' >>= \res -> return () {-# LINE 65 "HGamer3D\\Bindings\\OIS\\ClassSystem.chs" #-} ; cSyGetDevice :: HG3DClass -> String -> IO (HG3DClass) cSyGetDevice a1 a2 = withHG3DClass a1 $ \a1' -> withCString a2 $ \a2' -> alloca $ \a3' -> cSyGetDevice'_ a1' a2' a3' >>= \res -> peek a3'>>= \a3'' -> return (a3'') {-# LINE 70 "HGamer3D\\Bindings\\OIS\\ClassSystem.chs" #-} ; cSyHasDevice :: HG3DClass -> String -> IO (Bool) cSyHasDevice a1 a2 = withHG3DClass a1 $ \a1' -> withCString a2 $ \a2' -> alloca $ \a3' -> cSyHasDevice'_ a1' a2' a3' >>= \res -> peekBoolUtil a3'>>= \a3'' -> return (a3'') {-# LINE 75 "HGamer3D\\Bindings\\OIS\\ClassSystem.chs" #-} ; cSyLookupState :: HG3DClass -> String -> IO (HG3DClass) cSyLookupState a1 a2 = withHG3DClass a1 $ \a1' -> withCString a2 $ \a2' -> alloca $ \a3' -> cSyLookupState'_ a1' a2' a3' >>= \res -> peek a3'>>= \a3'' -> return (a3'') {-# LINE 80 "HGamer3D\\Bindings\\OIS\\ClassSystem.chs" #-} ; cSyCreateActionSchema :: HG3DClass -> String -> Bool -> IO (HG3DClass) cSyCreateActionSchema a1 a2 a3 = withHG3DClass a1 $ \a1' -> withCString a2 $ \a2' -> let {a3' = fromBool a3} in alloca $ \a4' -> cSyCreateActionSchema'_ a1' a2' a3' a4' >>= \res -> peek a4'>>= \a4'' -> return (a4'') {-# LINE 86 "HGamer3D\\Bindings\\OIS\\ClassSystem.chs" #-} ; cSyDestroyActionSchema :: HG3DClass -> String -> IO () cSyDestroyActionSchema a1 a2 = withHG3DClass a1 $ \a1' -> withCString a2 $ \a2' -> cSyDestroyActionSchema'_ a1' a2' >>= \res -> return () {-# LINE 90 "HGamer3D\\Bindings\\OIS\\ClassSystem.chs" #-} ; cSyDestroyActionSchema2 :: HG3DClass -> HG3DClass -> IO () cSyDestroyActionSchema2 a1 a2 = withHG3DClass a1 $ \a1' -> withHG3DClass a2 $ \a2' -> cSyDestroyActionSchema2'_ a1' a2' >>= \res -> return () {-# LINE 94 "HGamer3D\\Bindings\\OIS\\ClassSystem.chs" #-} ; cSyGetActionSchema :: HG3DClass -> String -> IO (HG3DClass) cSyGetActionSchema a1 a2 = withHG3DClass a1 $ \a1' -> withCString a2 $ \a2' -> alloca $ \a3' -> cSyGetActionSchema'_ a1' a2' a3' >>= \res -> peek a3'>>= \a3'' -> return (a3'') {-# LINE 99 "HGamer3D\\Bindings\\OIS\\ClassSystem.chs" #-} ; cSyHasActionSchema :: HG3DClass -> String -> IO (Bool) cSyHasActionSchema a1 a2 = withHG3DClass a1 $ \a1' -> withCString a2 $ \a2' -> alloca $ \a3' -> cSyHasActionSchema'_ a1' a2' a3' >>= \res -> peekBoolUtil a3'>>= \a3'' -> return (a3'') {-# LINE 104 "HGamer3D\\Bindings\\OIS\\ClassSystem.chs" #-} ; cSySetDefaultActionSchema :: HG3DClass -> HG3DClass -> IO () cSySetDefaultActionSchema a1 a2 = withHG3DClass a1 $ \a1' -> withHG3DClass a2 $ \a2' -> cSySetDefaultActionSchema'_ a1' a2' >>= \res -> return () {-# LINE 108 "HGamer3D\\Bindings\\OIS\\ClassSystem.chs" #-} ; cSySetDefaultActionSchema2 :: HG3DClass -> String -> IO () cSySetDefaultActionSchema2 a1 a2 = withHG3DClass a1 $ \a1' -> withCString a2 $ \a2' -> cSySetDefaultActionSchema2'_ a1' a2' >>= \res -> return () {-# LINE 112 "HGamer3D\\Bindings\\OIS\\ClassSystem.chs" #-} ; cSyGetDefaultActionSchemaAutoCreate :: HG3DClass -> IO (HG3DClass) cSyGetDefaultActionSchemaAutoCreate a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> cSyGetDefaultActionSchemaAutoCreate'_ a1' a2' >>= \res -> peek a2'>>= \a2'' -> return (a2'') {-# LINE 116 "HGamer3D\\Bindings\\OIS\\ClassSystem.chs" #-} ; cSyLookupAction :: HG3DClass -> String -> Bool -> IO (HG3DClass) cSyLookupAction a1 a2 a3 = withHG3DClass a1 $ \a1' -> withCString a2 $ \a2' -> let {a3' = fromBool a3} in alloca $ \a4' -> cSyLookupAction'_ a1' a2' a3' a4' >>= \res -> peek a4'>>= \a4'' -> return (a4'') {-# LINE 122 "HGamer3D\\Bindings\\OIS\\ClassSystem.chs" #-} ; cSyLookupBindable :: HG3DClass -> String -> IO (HG3DClass) cSyLookupBindable a1 a2 = withHG3DClass a1 $ \a1' -> withCString a2 $ \a2' -> alloca $ \a3' -> cSyLookupBindable'_ a1' a2' a3' >>= \res -> peek a3'>>= \a3'' -> return (a3'') {-# LINE 127 "HGamer3D\\Bindings\\OIS\\ClassSystem.chs" #-} ; cSyAddListenerToAllStates :: HG3DClass -> HG3DClass -> IO () cSyAddListenerToAllStates a1 a2 = withHG3DClass a1 $ \a1' -> withHG3DClass a2 $ \a2' -> cSyAddListenerToAllStates'_ a1' a2' >>= \res -> return () {-# LINE 131 "HGamer3D\\Bindings\\OIS\\ClassSystem.chs" #-} ; cSyRemoveListenerFromAllStates :: HG3DClass -> HG3DClass -> IO () cSyRemoveListenerFromAllStates a1 a2 = withHG3DClass a1 $ \a1' -> withHG3DClass a2 $ \a2' -> cSyRemoveListenerFromAllStates'_ a1' a2' >>= \res -> return () {-# LINE 135 "HGamer3D\\Bindings\\OIS\\ClassSystem.chs" #-} ; cSyAddListenerToAllActions :: HG3DClass -> HG3DClass -> IO () cSyAddListenerToAllActions a1 a2 = withHG3DClass a1 $ \a1' -> withHG3DClass a2 $ \a2' -> cSyAddListenerToAllActions'_ a1' a2' >>= \res -> return () {-# LINE 139 "HGamer3D\\Bindings\\OIS\\ClassSystem.chs" #-} ; cSyRemoveListenerFromAllActions :: HG3DClass -> HG3DClass -> IO () cSyRemoveListenerFromAllActions a1 a2 = withHG3DClass a1 $ \a1' -> withHG3DClass a2 $ \a2' -> cSyRemoveListenerFromAllActions'_ a1' a2' >>= \res -> return () {-# LINE 143 "HGamer3D\\Bindings\\OIS\\ClassSystem.chs" #-} ; cSyAddListenerToAllBindables :: HG3DClass -> HG3DClass -> IO () cSyAddListenerToAllBindables a1 a2 = withHG3DClass a1 $ \a1' -> withHG3DClass a2 $ \a2' -> cSyAddListenerToAllBindables'_ a1' a2' >>= \res -> return () {-# LINE 147 "HGamer3D\\Bindings\\OIS\\ClassSystem.chs" #-} ; cSyRemoveListenerFromAllBindables :: HG3DClass -> HG3DClass -> IO () cSyRemoveListenerFromAllBindables a1 a2 = withHG3DClass a1 $ \a1' -> withHG3DClass a2 $ \a2' -> cSyRemoveListenerFromAllBindables'_ a1' a2' >>= \res -> return () {-# LINE 151 "HGamer3D\\Bindings\\OIS\\ClassSystem.chs" #-} ; cSyLoadActionSchemaFromXML :: HG3DClass -> String -> IO (Int) cSyLoadActionSchemaFromXML a1 a2 = withHG3DClass a1 $ \a1' -> withCString a2 $ \a2' -> alloca $ \a3' -> cSyLoadActionSchemaFromXML'_ a1' a2' a3' >>= \res -> peekIntConv a3'>>= \a3'' -> return (a3'') {-# LINE 156 "HGamer3D\\Bindings\\OIS\\ClassSystem.chs" #-} ; cSyLoadActionSchemaFromXMLFile :: HG3DClass -> String -> IO (Int) cSyLoadActionSchemaFromXMLFile a1 a2 = withHG3DClass a1 $ \a1' -> withCString a2 $ \a2' -> alloca $ \a3' -> cSyLoadActionSchemaFromXMLFile'_ a1' a2' a3' >>= \res -> peekIntConv a3'>>= \a3'' -> return (a3'') {-# LINE 161 "HGamer3D\\Bindings\\OIS\\ClassSystem.chs" #-} ; cSyDumpDevices :: HG3DClass -> IO () cSyDumpDevices a1 = withHG3DClass a1 $ \a1' -> cSyDumpDevices'_ a1' >>= \res -> return () {-# LINE 164 "HGamer3D\\Bindings\\OIS\\ClassSystem.chs" #-} ; cSyDumpActionSchemas :: HG3DClass -> IO () cSyDumpActionSchemas a1 = withHG3DClass a1 $ \a1' -> cSyDumpActionSchemas'_ a1' >>= \res -> return () {-# LINE 167 "HGamer3D\\Bindings\\OIS\\ClassSystem.chs" #-} ; -- created constructor function from default constructor cSyGetSingletonPtr :: IO (HG3DClass) cSyGetSingletonPtr = alloca $ \a1' -> cSyGetSingletonPtr'_ a1' >>= \res -> peek a1'>>= \a1'' -> return (a1'') {-# LINE 171 "HGamer3D\\Bindings\\OIS\\ClassSystem.chs" #-} ; foreign import ccall safe "HGamer3D\\Bindings\\OIS\\ClassSystem.chs.h cSy_finalize_c" cSyFinalize'_ :: ((HG3DClassPtr) -> (IO ())) foreign import ccall safe "HGamer3D\\Bindings\\OIS\\ClassSystem.chs.h cSy_process_c" cSyProcess'_ :: ((HG3DClassPtr) -> (CFloat -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\OIS\\ClassSystem.chs.h cSy_getDevice_c" cSyGetDevice'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> ((HG3DClassPtr) -> (IO ())))) foreign import ccall safe "HGamer3D\\Bindings\\OIS\\ClassSystem.chs.h cSy_hasDevice_c" cSyHasDevice'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> ((Ptr CInt) -> (IO ())))) foreign import ccall safe "HGamer3D\\Bindings\\OIS\\ClassSystem.chs.h cSy_lookupState_c" cSyLookupState'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> ((HG3DClassPtr) -> (IO ())))) foreign import ccall safe "HGamer3D\\Bindings\\OIS\\ClassSystem.chs.h cSy_createActionSchema_c" cSyCreateActionSchema'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> (CInt -> ((HG3DClassPtr) -> (IO ()))))) foreign import ccall safe "HGamer3D\\Bindings\\OIS\\ClassSystem.chs.h cSy_destroyActionSchema_c" cSyDestroyActionSchema'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\OIS\\ClassSystem.chs.h cSy_destroyActionSchema2_c" cSyDestroyActionSchema2'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\OIS\\ClassSystem.chs.h cSy_getActionSchema_c" cSyGetActionSchema'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> ((HG3DClassPtr) -> (IO ())))) foreign import ccall safe "HGamer3D\\Bindings\\OIS\\ClassSystem.chs.h cSy_hasActionSchema_c" cSyHasActionSchema'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> ((Ptr CInt) -> (IO ())))) foreign import ccall safe "HGamer3D\\Bindings\\OIS\\ClassSystem.chs.h cSy_setDefaultActionSchema_c" cSySetDefaultActionSchema'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\OIS\\ClassSystem.chs.h cSy_setDefaultActionSchema2_c" cSySetDefaultActionSchema2'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\OIS\\ClassSystem.chs.h cSy_getDefaultActionSchemaAutoCreate_c" cSyGetDefaultActionSchemaAutoCreate'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\OIS\\ClassSystem.chs.h cSy_lookupAction_c" cSyLookupAction'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> (CInt -> ((HG3DClassPtr) -> (IO ()))))) foreign import ccall safe "HGamer3D\\Bindings\\OIS\\ClassSystem.chs.h cSy_lookupBindable_c" cSyLookupBindable'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> ((HG3DClassPtr) -> (IO ())))) foreign import ccall safe "HGamer3D\\Bindings\\OIS\\ClassSystem.chs.h cSy_addListenerToAllStates_c" cSyAddListenerToAllStates'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\OIS\\ClassSystem.chs.h cSy_removeListenerFromAllStates_c" cSyRemoveListenerFromAllStates'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\OIS\\ClassSystem.chs.h cSy_addListenerToAllActions_c" cSyAddListenerToAllActions'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\OIS\\ClassSystem.chs.h cSy_removeListenerFromAllActions_c" cSyRemoveListenerFromAllActions'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\OIS\\ClassSystem.chs.h cSy_addListenerToAllBindables_c" cSyAddListenerToAllBindables'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\OIS\\ClassSystem.chs.h cSy_removeListenerFromAllBindables_c" cSyRemoveListenerFromAllBindables'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\OIS\\ClassSystem.chs.h cSy_loadActionSchemaFromXML_c" cSyLoadActionSchemaFromXML'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> ((Ptr CInt) -> (IO ())))) foreign import ccall safe "HGamer3D\\Bindings\\OIS\\ClassSystem.chs.h cSy_loadActionSchemaFromXMLFile_c" cSyLoadActionSchemaFromXMLFile'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> ((Ptr CInt) -> (IO ())))) foreign import ccall safe "HGamer3D\\Bindings\\OIS\\ClassSystem.chs.h cSy_dumpDevices_c" cSyDumpDevices'_ :: ((HG3DClassPtr) -> (IO ())) foreign import ccall safe "HGamer3D\\Bindings\\OIS\\ClassSystem.chs.h cSy_dumpActionSchemas_c" cSyDumpActionSchemas'_ :: ((HG3DClassPtr) -> (IO ())) foreign import ccall safe "HGamer3D\\Bindings\\OIS\\ClassSystem.chs.h cSy_getSingletonPtr_c" cSyGetSingletonPtr'_ :: ((HG3DClassPtr) -> (IO ()))