-- 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\\CEGUI\\ClassWindowManager.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. -- -- ClassWindowManager.chs -- module HGamer3D.Bindings.CEGUI.ClassWindowManager 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.CEGUI.Utils {-# LINE 40 ".\\HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs" #-} import HGamer3D.Bindings.CEGUI.ClassPtr {-# LINE 41 ".\\HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs" #-} import HGamer3D.Bindings.CEGUI.StructHG3DClass {-# LINE 42 ".\\HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs" #-} -- | Constructs a new WindowManager - Details: NB: Client code should not create WindowManagerWindowManagerSystem new :: IO (HG3DClass) -- ^ new = alloca $ \a1' -> new'_ a1' >>= \res -> peek a1'>>= \a1'' -> return (a1'') {-# LINE 47 ".\\HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs" #-} -- | Destructor for WindowManager - Details: This will properly destry all remaining Window delete :: HG3DClass -- ^ classpointer - pointer of Class instance which is going to be deleted. -> IO () -- ^ delete a1 = withHG3DClass a1 $ \a1' -> delete'_ a1' >>= \res -> return () {-# LINE 51 ".\\HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs" #-} -- | Creates a new Window createWindow :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> String -- ^ type - String that describes the type of Window to be created. A valid WindowFactory for the specified type must be registered. -> String -- ^ name - String that holds a unique name that is to be given to the new window. If this string is empty (""), a name will be generated for the window. -> IO (HG3DClass) -- ^ return value - Pointer to the newly created createWindow a1 a2 a3 = withHG3DClass a1 $ \a1' -> withCString a2 $ \a2' -> withCString a3 $ \a3' -> alloca $ \a4' -> createWindow'_ a1' a2' a3' a4' >>= \res -> peek a4'>>= \a4'' -> return (a4'') {-# LINE 58 ".\\HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs" #-} -- | Destroy the specified Window destroyWindow :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> HG3DClass -- ^ window - Pointer to the Window object to be destroyed. If the window is null, or is not recognised, nothing happens. -> IO () -- ^ return value - Nothing destroyWindow a1 a2 = withHG3DClass a1 $ \a1' -> withHG3DClass a2 $ \a2' -> destroyWindow'_ a1' a2' >>= \res -> return () {-# LINE 63 ".\\HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs" #-} -- | Destroy the specified Window destroyWindow2 :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> String -- ^ window - String containing the name of the Window object to be destroyed. If window is not recognised, nothing happens. -> IO () -- ^ return value - Nothing. destroyWindow2 a1 a2 = withHG3DClass a1 $ \a1' -> withCString a2 $ \a2' -> destroyWindow2'_ a1' a2' >>= \res -> return () {-# LINE 68 ".\\HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs" #-} -- | Return a pointer to the specified Window getWindow :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> String -- ^ name - String holding the name of the Window object to be returned. -> IO (HG3DClass) -- ^ return value - Pointer to the getWindow a1 a2 = withHG3DClass a1 $ \a1' -> withCString a2 $ \a2' -> alloca $ \a3' -> getWindow'_ a1' a2' a3' >>= \res -> peek a3'>>= \a3'' -> return (a3'') {-# LINE 74 ".\\HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs" #-} -- | Examines the list of Window isWindowPresent :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> String -- ^ name - String holding the name of the Window object to look for. -> IO (Bool) -- ^ return value - true if a isWindowPresent a1 a2 = withHG3DClass a1 $ \a1' -> withCString a2 $ \a2' -> alloca $ \a3' -> isWindowPresent'_ a1' a2' a3' >>= \res -> peekBoolUtil a3'>>= \a3'' -> return (a3'') {-# LINE 80 ".\\HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs" #-} -- | Destroys all Window destroyAllWindows :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO () -- ^ return value - Nothing. destroyAllWindows a1 = withHG3DClass a1 $ \a1' -> destroyAllWindows'_ a1' >>= \res -> return () {-# LINE 84 ".\\HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs" #-} -- | Return whether the window dead pool is empty. isDeadPoolEmpty :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Bool) -- ^ isDeadPoolEmpty a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> isDeadPoolEmpty'_ a1' a2' >>= \res -> peekBoolUtil a2'>>= \a2'' -> return (a2'') {-# LINE 89 ".\\HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs" #-} -- | Permanently destroys any windows placed in the dead pool. - Details: It is probably not a good idea to call this from a Window cleanDeadPool :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO () -- ^ return value - Nothing. cleanDeadPool a1 = withHG3DClass a1 $ \a1' -> cleanDeadPool'_ a1' >>= \res -> return () {-# LINE 93 ".\\HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs" #-} -- | Save a full XML window layout, starting at the given Window saveWindowLayout :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> String -- ^ window - String holding the name of the Window object to become the root of the layout. -> String -- ^ filename - The name of the file to which the XML will be written. Note that this does not use any part of the ResourceProvider system, but rather will write directly to disk. If this is not desirable, you should prefer the OutStream based writeWindowLayoutToStream functions. -> Bool -- ^ writeParent - If the starting window has a parent window, specifies whether to write the parent name into the Parent attribute of the GUILayout XML element. -> IO () -- ^ saveWindowLayout a1 a2 a3 a4 = withHG3DClass a1 $ \a1' -> withCString a2 $ \a2' -> withCString a3 $ \a3' -> let {a4' = fromBool a4} in saveWindowLayout'_ a1' a2' a3' a4' >>= \res -> return () {-# LINE 100 ".\\HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs" #-} -- | Save a full XML window layout, starting at the given Window saveWindowLayout2 :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> HG3DClass -- ^ window - Window object to become the root of the layout. -> String -- ^ filename - The name of the file to which the XML will be written. Note that this does not use any part of the ResourceProvider system, but rather will write directly to disk. If this is not desirable, you should prefer the OutStream based writeWindowLayoutToStream functions. -> Bool -- ^ writeParent - If the starting window has a parent window, specifies whether to write the parent name into the Parent attribute of the GUILayout XML element. -> IO () -- ^ saveWindowLayout2 a1 a2 a3 a4 = withHG3DClass a1 $ \a1' -> withHG3DClass a2 $ \a2' -> withCString a3 $ \a3' -> let {a4' = fromBool a4} in saveWindowLayout2'_ a1' a2' a3' a4' >>= \res -> return () {-# LINE 107 ".\\HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs" #-} -- | Rename a window. renameWindow :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> String -- ^ window - String holding the current name of the window to be renamed. -> String -- ^ new_name - String holding the new name for the window -> IO () -- ^ renameWindow a1 a2 a3 = withHG3DClass a1 $ \a1' -> withCString a2 $ \a2' -> withCString a3 $ \a3' -> renameWindow'_ a1' a2' a3' >>= \res -> return () {-# LINE 113 ".\\HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs" #-} -- | Rename a window. renameWindow2 :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> HG3DClass -- ^ window - Pointer to the window to be renamed. -> String -- ^ new_name - String holding the new name for the window -> IO () -- ^ renameWindow2 a1 a2 a3 = withHG3DClass a1 $ \a1' -> withHG3DClass a2 $ \a2' -> withCString a3 $ \a3' -> renameWindow2'_ a1' a2' a3' >>= \res -> return () {-# LINE 119 ".\\HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs" #-} -- | Put WindowManager - Details: While WindowManager is in the locked state all attempts to create a --Window of any type will fail with an InvalidRequestException being --thrown. Calls to lock/unlock are recursive; if multiple calls to lock --are made, WindowManager is only unlocked after a matching number of --calls to unlock. -- lock :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO () -- ^ lock a1 = withHG3DClass a1 $ \a1' -> lock'_ a1' >>= \res -> return () {-# LINE 123 ".\\HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs" #-} -- | Put WindowManager - Details: While WindowManager is in the locked state all attempts to create a --Window of any type will fail with an InvalidRequestException being --thrown. Calls to lock/unlock are recursive; if multiple calls to lock --are made, WindowManager is only unlocked after a matching number of --calls to unlock. -- unlock :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO () -- ^ unlock a1 = withHG3DClass a1 $ \a1' -> unlock'_ a1' >>= \res -> return () {-# LINE 127 ".\\HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs" #-} -- | Returns whether WindowManager - Details: While WindowManager is in the locked state all attempts to create a --Window of any type will fail with an InvalidRequestException being --thrown. Calls to lock/unlock are recursive; if multiple calls to lock --are made, WindowManager is only unlocked after a matching number of --calls to unlock. -- isLocked :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Bool) -- ^ isLocked a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> isLocked'_ a1' a2' >>= \res -> peekBoolUtil a2'>>= \a2'' -> return (a2'') {-# LINE 132 ".\\HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs" #-} -- | Returns the default resource group currently set for layouts. getDefaultResourceGroup :: IO (String) -- ^ return value - String describing the default resource group identifier that will be used when loading layouts. getDefaultResourceGroup = alloc64k $ \a1' -> getDefaultResourceGroup'_ a1' >>= \res -> peekCString a1'>>= \a1'' -> return (a1'') {-# LINE 136 ".\\HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs" #-} -- | Sets the default resource group to be used when loading layouts. setDefaultResourceGroup :: String -- ^ resourceGroup - String describing the default resource group identifier to be used. -> IO () -- ^ return value - Nothing. setDefaultResourceGroup a1 = withCString a1 $ \a1' -> setDefaultResourceGroup'_ a1' >>= \res -> return () {-# LINE 140 ".\\HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs" #-} foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs.h cegui_wmgr_construct" new'_ :: ((HG3DClassPtr) -> (IO ())) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs.h cegui_wmgr_destruct" delete'_ :: ((HG3DClassPtr) -> (IO ())) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs.h cegui_wmgr_createWindow" createWindow'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> ((Ptr CChar) -> ((HG3DClassPtr) -> (IO ()))))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs.h cegui_wmgr_destroyWindow" destroyWindow'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs.h cegui_wmgr_destroyWindow2" destroyWindow2'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs.h cegui_wmgr_getWindow" getWindow'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> ((HG3DClassPtr) -> (IO ())))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs.h cegui_wmgr_isWindowPresent" isWindowPresent'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> ((Ptr CInt) -> (IO ())))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs.h cegui_wmgr_destroyAllWindows" destroyAllWindows'_ :: ((HG3DClassPtr) -> (IO ())) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs.h cegui_wmgr_isDeadPoolEmpty" isDeadPoolEmpty'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs.h cegui_wmgr_cleanDeadPool" cleanDeadPool'_ :: ((HG3DClassPtr) -> (IO ())) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs.h cegui_wmgr_saveWindowLayout" saveWindowLayout'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> ((Ptr CChar) -> (CInt -> (IO ()))))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs.h cegui_wmgr_saveWindowLayout2" saveWindowLayout2'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> ((Ptr CChar) -> (CInt -> (IO ()))))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs.h cegui_wmgr_renameWindow" renameWindow'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> ((Ptr CChar) -> (IO ())))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs.h cegui_wmgr_renameWindow2" renameWindow2'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> ((Ptr CChar) -> (IO ())))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs.h cegui_wmgr_lock" lock'_ :: ((HG3DClassPtr) -> (IO ())) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs.h cegui_wmgr_unlock" unlock'_ :: ((HG3DClassPtr) -> (IO ())) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs.h cegui_wmgr_isLocked" isLocked'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs.h cegui_wmgr_getDefaultResourceGroup" getDefaultResourceGroup'_ :: ((Ptr CChar) -> (IO ())) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassWindowManager.chs.h cegui_wmgr_setDefaultResourceGroup" setDefaultResourceGroup'_ :: ((Ptr CChar) -> (IO ()))