-- 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\\Ogre\\ClassResourceManager.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-2013 Peter Althainz
-- 
-- The files are part of HGamer3D (www.hgamer3d.org)
-- 
-- 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.
-- 


-- ClassResourceManager.chs

-- 

module HGamer3D.Bindings.Ogre.ClassResourceManager 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.Ogre.Utils
{-# LINE 42 ".\\HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs" #-}
import HGamer3D.Bindings.Ogre.ClassPtr
{-# LINE 43 ".\\HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs" #-}
import HGamer3D.Bindings.Ogre.StructHG3DClass
{-# LINE 44 ".\\HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs" #-}

{- function ~ResourceManager -}
delete :: HG3DClass -> IO ()
delete a1 =
  withHG3DClass a1 $ \a1' -> 
  delete'_ a1' >>= \res ->
  return ()
{-# LINE 49 ".\\HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs" #-}

{- function setMemoryBudget -}
setMemoryBudget :: HG3DClass -> Int -> IO ()
setMemoryBudget a1 a2 =
  withHG3DClass a1 $ \a1' -> 
  let {a2' = fromIntegral a2} in 
  setMemoryBudget'_ a1' a2' >>= \res ->
  return ()
{-# LINE 54 ".\\HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs" #-}

{- function getMemoryBudget -}
getMemoryBudget :: HG3DClass -> IO (Int)
getMemoryBudget a1 =
  withHG3DClass a1 $ \a1' -> 
  alloca $ \a2' -> 
  getMemoryBudget'_ a1' a2' >>= \res ->
  peekIntConv  a2'>>= \a2'' -> 
  return (a2'')
{-# LINE 59 ".\\HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs" #-}

{- function getMemoryUsage -}
getMemoryUsage :: HG3DClass -> IO (Int)
getMemoryUsage a1 =
  withHG3DClass a1 $ \a1' -> 
  alloca $ \a2' -> 
  getMemoryUsage'_ a1' a2' >>= \res ->
  peekIntConv  a2'>>= \a2'' -> 
  return (a2'')
{-# LINE 64 ".\\HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs" #-}

{- function unload -}
unload :: HG3DClass -> String -> IO ()
unload a1 a2 =
  withHG3DClass a1 $ \a1' -> 
  withCString a2 $ \a2' -> 
  unload'_ a1' a2' >>= \res ->
  return ()
{-# LINE 69 ".\\HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs" #-}

{- function unloadAll -}
unloadAll :: HG3DClass -> Bool -> IO ()
unloadAll a1 a2 =
  withHG3DClass a1 $ \a1' -> 
  let {a2' = fromBool a2} in 
  unloadAll'_ a1' a2' >>= \res ->
  return ()
{-# LINE 74 ".\\HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs" #-}

{- function reloadAll -}
reloadAll :: HG3DClass -> Bool -> IO ()
reloadAll a1 a2 =
  withHG3DClass a1 $ \a1' -> 
  let {a2' = fromBool a2} in 
  reloadAll'_ a1' a2' >>= \res ->
  return ()
{-# LINE 79 ".\\HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs" #-}

{- function unloadUnreferencedResources -}
unloadUnreferencedResources :: HG3DClass -> Bool -> IO ()
unloadUnreferencedResources a1 a2 =
  withHG3DClass a1 $ \a1' -> 
  let {a2' = fromBool a2} in 
  unloadUnreferencedResources'_ a1' a2' >>= \res ->
  return ()
{-# LINE 84 ".\\HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs" #-}

{- function reloadUnreferencedResources -}
reloadUnreferencedResources :: HG3DClass -> Bool -> IO ()
reloadUnreferencedResources a1 a2 =
  withHG3DClass a1 $ \a1' -> 
  let {a2' = fromBool a2} in 
  reloadUnreferencedResources'_ a1' a2' >>= \res ->
  return ()
{-# LINE 89 ".\\HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs" #-}

{- function remove2 -}
remove2 :: HG3DClass -> String -> IO ()
remove2 a1 a2 =
  withHG3DClass a1 $ \a1' -> 
  withCString a2 $ \a2' -> 
  remove2'_ a1' a2' >>= \res ->
  return ()
{-# LINE 94 ".\\HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs" #-}

{- function removeAll -}
removeAll :: HG3DClass -> IO ()
removeAll a1 =
  withHG3DClass a1 $ \a1' -> 
  removeAll'_ a1' >>= \res ->
  return ()
{-# LINE 98 ".\\HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs" #-}

{- function removeUnreferencedResources -}
removeUnreferencedResources :: HG3DClass -> Bool -> IO ()
removeUnreferencedResources a1 a2 =
  withHG3DClass a1 $ \a1' -> 
  let {a2' = fromBool a2} in 
  removeUnreferencedResources'_ a1' a2' >>= \res ->
  return ()
{-# LINE 103 ".\\HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs" #-}

{- function resourceExists -}
resourceExists :: HG3DClass -> String -> IO (Bool)
resourceExists a1 a2 =
  withHG3DClass a1 $ \a1' -> 
  withCString a2 $ \a2' -> 
  alloca $ \a3' -> 
  resourceExists'_ a1' a2' a3' >>= \res ->
  peekBoolUtil  a3'>>= \a3'' -> 
  return (a3'')
{-# LINE 109 ".\\HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs" #-}

{- function getLoadingOrder -}
getLoadingOrder :: HG3DClass -> IO (Float)
getLoadingOrder a1 =
  withHG3DClass a1 $ \a1' -> 
  alloca $ \a2' -> 
  getLoadingOrder'_ a1' a2' >>= \res ->
  peekFloatConv  a2'>>= \a2'' -> 
  return (a2'')
{-# LINE 114 ".\\HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs" #-}

{- function getResourceType -}
getResourceType :: HG3DClass -> IO (String)
getResourceType a1 =
  withHG3DClass a1 $ \a1' -> 
  alloc64k $ \a2' -> 
  getResourceType'_ a1' a2' >>= \res ->
  peekCString  a2'>>= \a2'' -> 
  return (a2'')
{-# LINE 119 ".\\HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs" #-}

{- function setVerbose -}
setVerbose :: HG3DClass -> Bool -> IO ()
setVerbose a1 a2 =
  withHG3DClass a1 $ \a1' -> 
  let {a2' = fromBool a2} in 
  setVerbose'_ a1' a2' >>= \res ->
  return ()
{-# LINE 124 ".\\HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs" #-}

{- function getVerbose -}
getVerbose :: HG3DClass -> IO (Bool)
getVerbose a1 =
  withHG3DClass a1 $ \a1' -> 
  alloca $ \a2' -> 
  getVerbose'_ a1' a2' >>= \res ->
  peekBoolUtil  a2'>>= \a2'' -> 
  return (a2'')
{-# LINE 129 ".\\HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs" #-}

{- function destroyResourcePool2 -}
destroyResourcePool2 :: HG3DClass -> String -> IO ()
destroyResourcePool2 a1 a2 =
  withHG3DClass a1 $ \a1' -> 
  withCString a2 $ \a2' -> 
  destroyResourcePool2'_ a1' a2' >>= \res ->
  return ()
{-# LINE 134 ".\\HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs" #-}

{- function destroyAllResourcePools -}
destroyAllResourcePools :: HG3DClass -> IO ()
destroyAllResourcePools a1 =
  withHG3DClass a1 $ \a1' -> 
  destroyAllResourcePools'_ a1' >>= \res ->
  return ()
{-# LINE 138 ".\\HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs" #-}


foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs.h ogre_rsrcmgr_destruct"
  delete'_ :: ((HG3DClassPtr) -> (IO ()))

foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs.h ogre_rsrcmgr_setMemoryBudget"
  setMemoryBudget'_ :: ((HG3DClassPtr) -> (CInt -> (IO ())))

foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs.h ogre_rsrcmgr_getMemoryBudget"
  getMemoryBudget'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ())))

foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs.h ogre_rsrcmgr_getMemoryUsage"
  getMemoryUsage'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ())))

foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs.h ogre_rsrcmgr_unload"
  unload'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> (IO ())))

foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs.h ogre_rsrcmgr_unloadAll"
  unloadAll'_ :: ((HG3DClassPtr) -> (CInt -> (IO ())))

foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs.h ogre_rsrcmgr_reloadAll"
  reloadAll'_ :: ((HG3DClassPtr) -> (CInt -> (IO ())))

foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs.h ogre_rsrcmgr_unloadUnreferencedResources"
  unloadUnreferencedResources'_ :: ((HG3DClassPtr) -> (CInt -> (IO ())))

foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs.h ogre_rsrcmgr_reloadUnreferencedResources"
  reloadUnreferencedResources'_ :: ((HG3DClassPtr) -> (CInt -> (IO ())))

foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs.h ogre_rsrcmgr_remove2"
  remove2'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> (IO ())))

foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs.h ogre_rsrcmgr_removeAll"
  removeAll'_ :: ((HG3DClassPtr) -> (IO ()))

foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs.h ogre_rsrcmgr_removeUnreferencedResources"
  removeUnreferencedResources'_ :: ((HG3DClassPtr) -> (CInt -> (IO ())))

foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs.h ogre_rsrcmgr_resourceExists"
  resourceExists'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> ((Ptr CInt) -> (IO ()))))

foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs.h ogre_rsrcmgr_getLoadingOrder"
  getLoadingOrder'_ :: ((HG3DClassPtr) -> ((Ptr CFloat) -> (IO ())))

foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs.h ogre_rsrcmgr_getResourceType"
  getResourceType'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> (IO ())))

foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs.h ogre_rsrcmgr_setVerbose"
  setVerbose'_ :: ((HG3DClassPtr) -> (CInt -> (IO ())))

foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs.h ogre_rsrcmgr_getVerbose"
  getVerbose'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ())))

foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs.h ogre_rsrcmgr_destroyResourcePool2"
  destroyResourcePool2'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> (IO ())))

foreign import ccall safe "HGamer3D\\Bindings\\Ogre\\ClassResourceManager.chs.h ogre_rsrcmgr_destroyAllResourcePools"
  destroyAllResourcePools'_ :: ((HG3DClassPtr) -> (IO ()))