-- 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\\ClassDragContainer.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. -- -- ClassDragContainer.chs -- module HGamer3D.Bindings.CEGUI.ClassDragContainer 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\\ClassDragContainer.chs" #-} import HGamer3D.Bindings.CEGUI.ClassPtr {-# LINE 41 ".\\HGamer3D\\Bindings\\CEGUI\\ClassDragContainer.chs" #-} import HGamer3D.Bindings.CEGUI.StructHG3DClass {-# LINE 42 ".\\HGamer3D\\Bindings\\CEGUI\\ClassDragContainer.chs" #-} -- | Constructor for DragContainer 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 49 ".\\HGamer3D\\Bindings\\CEGUI\\ClassDragContainer.chs" #-} -- | Destructor for DragContainer delete :: HG3DClass -- ^ classpointer - pointer of Class instance which is going to be deleted. -> IO () -- ^ delete a1 = withHG3DClass a1 $ \a1' -> delete'_ a1' >>= \res -> return () {-# LINE 53 ".\\HGamer3D\\Bindings\\CEGUI\\ClassDragContainer.chs" #-} -- | Return whether dragging is currently enabled for this DragContainer isDraggingEnabled :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Bool) -- ^ isDraggingEnabled a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> isDraggingEnabled'_ a1' a2' >>= \res -> peekBoolUtil a2'>>= \a2'' -> return (a2'') {-# LINE 58 ".\\HGamer3D\\Bindings\\CEGUI\\ClassDragContainer.chs" #-} -- | Set whether dragging is currently enabled for this DragContainer setDraggingEnabled :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Bool -- ^ setting - -- -- -> IO () -- ^ return value - Nothing. setDraggingEnabled a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = fromBool a2} in setDraggingEnabled'_ a1' a2' >>= \res -> return () {-# LINE 63 ".\\HGamer3D\\Bindings\\CEGUI\\ClassDragContainer.chs" #-} -- | Return whether the DragContainer isBeingDragged :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Bool) -- ^ isBeingDragged a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> isBeingDragged'_ a1' a2' >>= \res -> peekBoolUtil a2'>>= \a2'' -> return (a2'') {-# LINE 68 ".\\HGamer3D\\Bindings\\CEGUI\\ClassDragContainer.chs" #-} -- | Return the current drag threshold in pixels. - Details: The drag threshold is the number of pixels that the mouse must be --moved with the left button held down in order to commence a drag --operation. -- getPixelDragThreshold :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Float) -- ^ getPixelDragThreshold a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getPixelDragThreshold'_ a1' a2' >>= \res -> peekFloatConv a2'>>= \a2'' -> return (a2'') {-# LINE 73 ".\\HGamer3D\\Bindings\\CEGUI\\ClassDragContainer.chs" #-} -- | Set the current drag threshold in pixels. - Details: The drag threshold is the number of pixels that the mouse must be --moved with the left button held down in order to commence a drag --operation. -- setPixelDragThreshold :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Float -- ^ pixels -> IO () -- ^ setPixelDragThreshold a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = realToFrac a2} in setPixelDragThreshold'_ a1' a2' >>= \res -> return () {-# LINE 78 ".\\HGamer3D\\Bindings\\CEGUI\\ClassDragContainer.chs" #-} -- | Return the alpha value that will be set on the DragContainer getDragAlpha :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Float) -- ^ return value - Current alpha value to use whilst dragging. getDragAlpha a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getDragAlpha'_ a1' a2' >>= \res -> peekFloatConv a2'>>= \a2'' -> return (a2'') {-# LINE 83 ".\\HGamer3D\\Bindings\\CEGUI\\ClassDragContainer.chs" #-} -- | Set the alpha value to be set on the DragContainer - Details: This method can be used while a drag is in progress to update the alpha. Note that --the normal setAlpha method does not affect alpha while a drag is in progress, but --once the drag operation has ended, any value set via setAlpha will be restored. -- setDragAlpha :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Float -- ^ alpha -> IO () -- ^ setDragAlpha a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = realToFrac a2} in setDragAlpha'_ a1' a2' >>= \res -> return () {-# LINE 88 ".\\HGamer3D\\Bindings\\CEGUI\\ClassDragContainer.chs" #-} -- | Set the Image to be used for the mouse cursor when a drag operation is in progress. - Details: This method may be used during a drag operation to update the current mouse --cursor image. -- setDragCursorImage3 :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> String -- ^ imageset -> String -- ^ image -> IO () -- ^ setDragCursorImage3 a1 a2 a3 = withHG3DClass a1 $ \a1' -> withCString a2 $ \a2' -> withCString a3 $ \a3' -> setDragCursorImage3'_ a1' a2' a3' >>= \res -> return () {-# LINE 94 ".\\HGamer3D\\Bindings\\CEGUI\\ClassDragContainer.chs" #-} -- | Return the WindowDragContainer - Details: The drop target for a DragContainer is basically the Window that the DragContainer --is within while being dragged. The drop target may be 0 to indicate no target. -- getCurrentDropTarget :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (HG3DClass) -- ^ getCurrentDropTarget a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> getCurrentDropTarget'_ a1' a2' >>= \res -> peek a2'>>= \a2'' -> return (a2'') {-# LINE 99 ".\\HGamer3D\\Bindings\\CEGUI\\ClassDragContainer.chs" #-} -- | Return whether sticky mode is enable or disabled. isStickyModeEnabled :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Bool) -- ^ isStickyModeEnabled a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> isStickyModeEnabled'_ a1' a2' >>= \res -> peekBoolUtil a2'>>= \a2'' -> return (a2'') {-# LINE 104 ".\\HGamer3D\\Bindings\\CEGUI\\ClassDragContainer.chs" #-} -- | Enable or disable sticky mode. setStickyModeEnabled :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Bool -- ^ setting - -- -- -> IO () -- ^ setStickyModeEnabled a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = fromBool a2} in setStickyModeEnabled'_ a1' a2' >>= \res -> return () {-# LINE 109 ".\\HGamer3D\\Bindings\\CEGUI\\ClassDragContainer.chs" #-} -- | Immediately pick up the DragContainer pickUp :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Bool -- ^ force_sticky - -- -- -> IO (Bool) -- ^ pickUp a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = fromBool a2} in alloca $ \a3' -> pickUp'_ a1' a2' a3' >>= \res -> peekBoolUtil a3'>>= \a3'' -> return (a3'') {-# LINE 115 ".\\HGamer3D\\Bindings\\CEGUI\\ClassDragContainer.chs" #-} -- | Set whether the fixed dragging offset - as set with the setFixedDragOffset - function will be used, or whether the built-in positioning will be used. setUsingFixedDragOffset :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> Bool -- ^ enable - -- -- -> IO () -- ^ setUsingFixedDragOffset a1 a2 = withHG3DClass a1 $ \a1' -> let {a2' = fromBool a2} in setUsingFixedDragOffset'_ a1' a2' >>= \res -> return () {-# LINE 120 ".\\HGamer3D\\Bindings\\CEGUI\\ClassDragContainer.chs" #-} -- | Return whether the fixed dragging offset - as set with the setFixedDragOffset function - will be used, or whether the built-in positioning will be used. isUsingFixedDragOffset :: HG3DClass -- ^ classpointer - pointer of Class instance from which this methods is called. -> IO (Bool) -- ^ isUsingFixedDragOffset a1 = withHG3DClass a1 $ \a1' -> alloca $ \a2' -> isUsingFixedDragOffset'_ a1' a2' >>= \res -> peekBoolUtil a2'>>= \a2'' -> return (a2'') {-# LINE 125 ".\\HGamer3D\\Bindings\\CEGUI\\ClassDragContainer.chs" #-} foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassDragContainer.chs.h cegui_drgcnt_construct" new'_ :: ((Ptr CChar) -> ((Ptr CChar) -> ((HG3DClassPtr) -> (IO ())))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassDragContainer.chs.h cegui_drgcnt_destruct" delete'_ :: ((HG3DClassPtr) -> (IO ())) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassDragContainer.chs.h cegui_drgcnt_isDraggingEnabled" isDraggingEnabled'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassDragContainer.chs.h cegui_drgcnt_setDraggingEnabled" setDraggingEnabled'_ :: ((HG3DClassPtr) -> (CInt -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassDragContainer.chs.h cegui_drgcnt_isBeingDragged" isBeingDragged'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassDragContainer.chs.h cegui_drgcnt_getPixelDragThreshold" getPixelDragThreshold'_ :: ((HG3DClassPtr) -> ((Ptr CFloat) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassDragContainer.chs.h cegui_drgcnt_setPixelDragThreshold" setPixelDragThreshold'_ :: ((HG3DClassPtr) -> (CFloat -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassDragContainer.chs.h cegui_drgcnt_getDragAlpha" getDragAlpha'_ :: ((HG3DClassPtr) -> ((Ptr CFloat) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassDragContainer.chs.h cegui_drgcnt_setDragAlpha" setDragAlpha'_ :: ((HG3DClassPtr) -> (CFloat -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassDragContainer.chs.h cegui_drgcnt_setDragCursorImage3" setDragCursorImage3'_ :: ((HG3DClassPtr) -> ((Ptr CChar) -> ((Ptr CChar) -> (IO ())))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassDragContainer.chs.h cegui_drgcnt_getCurrentDropTarget" getCurrentDropTarget'_ :: ((HG3DClassPtr) -> ((HG3DClassPtr) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassDragContainer.chs.h cegui_drgcnt_isStickyModeEnabled" isStickyModeEnabled'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassDragContainer.chs.h cegui_drgcnt_setStickyModeEnabled" setStickyModeEnabled'_ :: ((HG3DClassPtr) -> (CInt -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassDragContainer.chs.h cegui_drgcnt_pickUp" pickUp'_ :: ((HG3DClassPtr) -> (CInt -> ((Ptr CInt) -> (IO ())))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassDragContainer.chs.h cegui_drgcnt_setUsingFixedDragOffset" setUsingFixedDragOffset'_ :: ((HG3DClassPtr) -> (CInt -> (IO ()))) foreign import ccall safe "HGamer3D\\Bindings\\CEGUI\\ClassDragContainer.chs.h cegui_drgcnt_isUsingFixedDragOffset" isUsingFixedDragOffset'_ :: ((HG3DClassPtr) -> ((Ptr CInt) -> (IO ())))