-- 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\\ClassTree.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. -- -- ClassTree.chs -- module HGamer3D.Bindings.CEGUI.ClassTree 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\\ClassTree.chs" #-} import HGamer3D.Bindings.CEGUI.ClassPtr {-# LINE 41 ".\\HGamer3D\\Bindings\\CEGUI\\ClassTree.chs" #-} import HGamer3D.Bindings.CEGUI.StructHG3DClass {-# LINE 42 ".\\HGamer3D\\Bindings\\CEGUI\\ClassTree.chs" #-} -- | doTreeRender :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO () -- ^ doTreeRender a1 = withHG3DClass a1 $ \a1' -> doTreeRender'_ a1' >>= \res -> return () {-# LINE 47 ".\\HGamer3D\\Bindings\\CEGUI\\ClassTree.chs" #-} -- | doScrollbars :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO () -- ^ doScrollbars a1 = withHG3DClass a1 $ \a1' -> doScrollbars'_ a1' >>= \res -> return () {-# LINE 51 ".\\HGamer3D\\Bindings\\CEGUI\\ClassTree.chs" #-} -- | Return number of items attached to the tree. getItemCount :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Int) -- ^ return value - the number of items currently attached to this tree. getItemCount a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getItemCount'_ a1' a2' >>= \res -> peekIntConv a2'>>= \a2'' -> return (a2'') {-# LINE 56 ".\\HGamer3D\\Bindings\\CEGUI\\ClassTree.chs" #-} -- | Return the number of selected items in the tree. getSelectedCount :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Int) -- ^ return value - Total number of attached items that are in the selected state. getSelectedCount a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getSelectedCount'_ a1' a2' >>= \res -> peekIntConv a2'>>= \a2'' -> return (a2'') {-# LINE 61 ".\\HGamer3D\\Bindings\\CEGUI\\ClassTree.chs" #-} -- | return whether tree sorting is enabled isSortEnabled :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Bool) -- ^ isSortEnabled a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> isSortEnabled'_ a1' a2' >>= \res -> peekBoolUtil a2'>>= \a2'' -> return (a2'') {-# LINE 66 ".\\HGamer3D\\Bindings\\CEGUI\\ClassTree.chs" #-} -- | getVertScrollbar :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (HG3DClass) -- ^ getVertScrollbar a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getVertScrollbar'_ a1' a2' >>= \res -> peek a2'>>= \a2'' -> return (a2'') {-# LINE 71 ".\\HGamer3D\\Bindings\\CEGUI\\ClassTree.chs" #-} -- | getHorzScrollbar :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (HG3DClass) -- ^ getHorzScrollbar a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getHorzScrollbar'_ a1' a2' >>= \res -> peek a2'>>= \a2'' -> return (a2'') {-# LINE 76 ".\\HGamer3D\\Bindings\\CEGUI\\ClassTree.chs" #-} -- | return whether multi-select is enabled isMultiselectEnabled :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Bool) -- ^ return value - true if multi-select is enabled, false if multi-select is not enabled. isMultiselectEnabled a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> isMultiselectEnabled'_ a1' a2' >>= \res -> peekBoolUtil a2'>>= \a2'' -> return (a2'') {-# LINE 81 ".\\HGamer3D\\Bindings\\CEGUI\\ClassTree.chs" #-} -- | isItemTooltipsEnabled :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Bool) -- ^ isItemTooltipsEnabled a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> isItemTooltipsEnabled'_ a1' a2' >>= \res -> peekBoolUtil a2'>>= \a2'' -> return (a2'') {-# LINE 86 ".\\HGamer3D\\Bindings\\CEGUI\\ClassTree.chs" #-} -- | Return whether the vertical scroll bar is always shown. isVertScrollbarAlwaysShown :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Bool) -- ^ isVertScrollbarAlwaysShown a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> isVertScrollbarAlwaysShown'_ a1' a2' >>= \res -> peekBoolUtil a2'>>= \a2'' -> return (a2'') {-# LINE 91 ".\\HGamer3D\\Bindings\\CEGUI\\ClassTree.chs" #-} -- | Return whether the horizontal scroll bar is always shown. isHorzScrollbarAlwaysShown :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Bool) -- ^ isHorzScrollbarAlwaysShown a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> isHorzScrollbarAlwaysShown'_ a1' a2' >>= \res -> peekBoolUtil a2'>>= \a2'' -> return (a2'') {-# LINE 96 ".\\HGamer3D\\Bindings\\CEGUI\\ClassTree.chs" #-} -- | Initialise the Window - Details: This must be called for every window created. Normally this is handled automatically by the WindowFactory for each Window initialise :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO () -- ^ return value - Nothing initialise a1 = withHG3DClass a1 $ \a1' -> initialise'_ a1' >>= \res -> return () {-# LINE 100 ".\\HGamer3D\\Bindings\\CEGUI\\ClassTree.chs" #-} -- | Remove all items from the tree. - Details: Note that this will cause 'AutoDelete' items to be deleted. resetList :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO () -- ^ resetList a1 = withHG3DClass a1 $ \a1' -> resetList'_ a1' >>= \res -> return () {-# LINE 104 ".\\HGamer3D\\Bindings\\CEGUI\\ClassTree.chs" #-} -- | Clear the selected state for all items. clearAllSelections :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO () -- ^ return value - Nothing. clearAllSelections a1 = withHG3DClass a1 $ \a1' -> clearAllSelections'_ a1' >>= \res -> return () {-# LINE 108 ".\\HGamer3D\\Bindings\\CEGUI\\ClassTree.chs" #-} -- | Set whether the tree should be sorted. setSortingEnabled :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Bool -- ^ setting - -- -- -> IO () -- ^ return value - Nothing. setSortingEnabled a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = fromBool a2} in setSortingEnabled'_ a1' a2' >>= \res -> return () {-# LINE 113 ".\\HGamer3D\\Bindings\\CEGUI\\ClassTree.chs" #-} -- | Set whether the tree should allow multiple selections or just a single selection. setMultiselectEnabled :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Bool -- ^ setting - -- -- -> IO () -- ^ return value - Nothing. setMultiselectEnabled a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = fromBool a2} in setMultiselectEnabled'_ a1' a2' >>= \res -> return () {-# LINE 118 ".\\HGamer3D\\Bindings\\CEGUI\\ClassTree.chs" #-} -- | Set whether the vertical scroll bar should always be shown. setShowVertScrollbar :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Bool -- ^ setting - -- -- -> IO () -- ^ return value - Nothing. setShowVertScrollbar a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = fromBool a2} in setShowVertScrollbar'_ a1' a2' >>= \res -> return () {-# LINE 123 ".\\HGamer3D\\Bindings\\CEGUI\\ClassTree.chs" #-} -- | Set whether the horizontal scroll bar should always be shown. setShowHorzScrollbar :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Bool -- ^ setting - -- -- -> IO () -- ^ return value - Nothing. setShowHorzScrollbar a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = fromBool a2} in setShowHorzScrollbar'_ a1' a2' >>= \res -> return () {-# LINE 128 ".\\HGamer3D\\Bindings\\CEGUI\\ClassTree.chs" #-} -- | setItemTooltipsEnabled :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Bool -- ^ setting -> IO () -- ^ setItemTooltipsEnabled a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = fromBool a2} in setItemTooltipsEnabled'_ a1' a2' >>= \res -> return () {-# LINE 133 ".\\HGamer3D\\Bindings\\CEGUI\\ClassTree.chs" #-} -- | Set the select state of an attached TreeItem. - Details: This is the recommended way of selecting and deselecting items attached to a tree as it respects the multi-select mode setting. It is possible to modify the setting on TreeItems directly, but that approach does not respect the settings of the tree. setItemSelectState2 :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Int -- ^ item_index -> Bool -- ^ state -> IO () -- ^ setItemSelectState2 a1 a2 a3 = withHG3DClass a1 $ \a1' -> let {a2' = fromIntegral a2} in let {a3' = fromBool a3} in setItemSelectState2'_ a1' a2' a3' >>= \res -> return () {-# LINE 139 ".\\HGamer3D\\Bindings\\CEGUI\\ClassTree.chs" #-} -- | Set the LookNFeel that shoule be used for this window. - Details: Once a look'n'feel has been assigned it is locked - as in cannot be changed. setLookNFeel :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> String -- ^ look - String object holding the name of the look to be assigned to the window. -> IO () -- ^ return value - Nothing. setLookNFeel a1 a2 = withHG3DClass a1 $ \a1' -> withCString a2 $ \a2' -> setLookNFeel'_ a1' a2' >>= \res -> return () {-# LINE 144 ".\\HGamer3D\\Bindings\\CEGUI\\ClassTree.chs" #-} -- | Causes the tree to update it's internal state after changes have been made to one or more attached TreeItem objects. - Details: Client code must call this whenever it has made any changes to TreeItem objects already attached to the tree. If you are just adding items, or removed items to update them prior to re-adding them, there is no need to call this method. handleUpdatedItemData :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO () -- ^ handleUpdatedItemData a1 = withHG3DClass a1 $ \a1' -> handleUpdatedItemData'_ a1' >>= \res -> return () {-# LINE 148 ".\\HGamer3D\\Bindings\\CEGUI\\ClassTree.chs" #-} -- | Constructor for Tree new :: String -- ^ type -> String -- ^ name -> IO (HG3DClass) -- ^ new a1 a2 = withCString a1 $ \a1' -> withCString a2 $ \a2' -> alloca $ \a3' -> new'_ a1' a2' a3' >>= \res -> peek a3'>>= \a3'' -> return (a3'') {-# LINE 154 ".\\HGamer3D\\Bindings\\CEGUI\\ClassTree.chs" #-} -- | Destructor for Tree delete :: HG3DClass -- ^ classpointer - pointer of Class instance which is going to be deleted. -> IO () -- ^ delete a1 = withHG3DClass a1 $ \a1' -> delete'_ a1' >>= \res -> return () {-# LINE 158 ".\\HGamer3D\\Bindings\\CEGUI\\ClassTree.chs" #-} foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassTree.chs.h cegui_tree_doTreeRender" doTreeRender'_ :: ((HG3DClassPtr) -> (IO ())) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassTree.chs.h cegui_tree_doScrollbars" doScrollbars'_ :: ((HG3DClassPtr) -> (IO ())) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassTree.chs.h cegui_tree_getItemCount" getItemCount'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassTree.chs.h cegui_tree_getSelectedCount" getSelectedCount'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassTree.chs.h cegui_tree_isSortEnabled" isSortEnabled'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassTree.chs.h cegui_tree_getVertScrollbar" getVertScrollbar'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassTree.chs.h cegui_tree_getHorzScrollbar" getHorzScrollbar'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassTree.chs.h cegui_tree_isMultiselectEnabled" isMultiselectEnabled'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassTree.chs.h cegui_tree_isItemTooltipsEnabled" isItemTooltipsEnabled'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassTree.chs.h cegui_tree_isVertScrollbarAlwaysShown" isVertScrollbarAlwaysShown'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassTree.chs.h cegui_tree_isHorzScrollbarAlwaysShown" isHorzScrollbarAlwaysShown'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassTree.chs.h cegui_tree_initialise" initialise'_ :: ((HG3DClassPtr) -> (IO ())) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassTree.chs.h cegui_tree_resetList" resetList'_ :: ((HG3DClassPtr) -> (IO ())) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassTree.chs.h cegui_tree_clearAllSelections" clearAllSelections'_ :: ((HG3DClassPtr) -> (IO ())) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassTree.chs.h cegui_tree_setSortingEnabled" setSortingEnabled'_ :: ((HG3DClassPtr) -> (CInt -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassTree.chs.h cegui_tree_setMultiselectEnabled" setMultiselectEnabled'_ :: ((HG3DClassPtr) -> (CInt -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassTree.chs.h cegui_tree_setShowVertScrollbar" setShowVertScrollbar'_ :: ((HG3DClassPtr) -> (CInt -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassTree.chs.h cegui_tree_setShowHorzScrollbar" setShowHorzScrollbar'_ :: ((HG3DClassPtr) -> (CInt -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassTree.chs.h cegui_tree_setItemTooltipsEnabled" setItemTooltipsEnabled'_ :: ((HG3DClassPtr) -> (CInt -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassTree.chs.h cegui_tree_setItemSelectState2" setItemSelectState2'_ :: ((HG3DClassPtr) -> (CInt -> (CInt -> (IO ())))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassTree.chs.h cegui_tree_setLookNFeel" setLookNFeel'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassTree.chs.h cegui_tree_handleUpdatedItemData" handleUpdatedItemData'_ :: ((HG3DClassPtr) -> (IO ())) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassTree.chs.h cegui_tree_construct" new'_ :: ((Ptr CChar) -> ((Ptr CChar) -> ((HG3DClassPtr) -> (IO ())))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassTree.chs.h cegui_tree_destruct" delete'_ :: ((HG3DClassPtr) -> (IO ()))