module Graphics.UI.FLTK.LowLevel.Positioner
(
positionerNew
)
where
import qualified Foreign.C.Types as C2HSImp
import qualified Foreign.Ptr as C2HSImp
import C2HS hiding (cFromEnum, cFromBool, cToBool,cToEnum)
import Foreign.C.Types
import Graphics.UI.FLTK.LowLevel.Fl_Enumerations
import Graphics.UI.FLTK.LowLevel.Fl_Types
import Graphics.UI.FLTK.LowLevel.Utils
import Graphics.UI.FLTK.LowLevel.Hierarchy
import Graphics.UI.FLTK.LowLevel.Dispatch
positionerNew' :: (Int) -> (Int) -> (Int) -> (Int) -> IO ((Ptr ()))
positionerNew' a1 a2 a3 a4 =
let {a1' = fromIntegral a1} in
let {a2' = fromIntegral a2} in
let {a3' = fromIntegral a3} in
let {a4' = fromIntegral a4} in
positionerNew''_ a1' a2' a3' a4' >>= \res ->
let {res' = id res} in
return (res')
positionerNewWithLabel' :: (Int) -> (Int) -> (Int) -> (Int) -> (String) -> IO ((Ptr ()))
positionerNewWithLabel' a1 a2 a3 a4 a5 =
let {a1' = fromIntegral a1} in
let {a2' = fromIntegral a2} in
let {a3' = fromIntegral a3} in
let {a4' = fromIntegral a4} in
let {a5' = unsafeToCString a5} in
positionerNewWithLabel''_ a1' a2' a3' a4' a5' >>= \res ->
let {res' = id res} in
return (res')
positionerNew :: Rectangle -> Maybe String -> IO (Ref Positioner)
positionerNew rectangle l'=
let (x_pos, y_pos, width, height) = fromRectangle rectangle
in case l' of
Nothing -> positionerNew' x_pos y_pos width height >>=
toRef
Just l -> positionerNewWithLabel' x_pos y_pos width height l >>=
toRef
positionerDestroy' :: (Ptr ()) -> IO ((()))
positionerDestroy' a1 =
let {a1' = id a1} in
positionerDestroy''_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
instance (impl ~ (IO ())) => Op (Destroy ()) Positioner orig impl where
runOp _ _ win = swapRef win $ \winPtr -> do
positionerDestroy' winPtr
return nullPtr
positionerHandle' :: (Ptr ()) -> (CInt) -> IO ((Int))
positionerHandle' a1 a2 =
let {a1' = id a1} in
let {a2' = id a2} in
positionerHandle''_ a1' a2' >>= \res ->
let {res' = fromIntegral res} in
return (res')
instance (impl ~ (Event -> IO Int)) => Op (Handle ()) Positioner orig impl where
runOp _ _ positioner event = withRef positioner (\p -> positionerHandle' p (fromIntegral . fromEnum $ event))
setXvalue' :: (Ptr ()) -> (Double) -> IO ()
setXvalue' a1 a2 =
let {a1' = id a1} in
let {a2' = realToFrac a2} in
setXvalue''_ a1' a2' >>
return ()
instance (impl ~ (Double -> IO ())) => Op (SetXvalue ()) Positioner orig impl where
runOp _ _ positioner xvalue = withRef positioner $ \positionerPtr -> setXvalue' positionerPtr xvalue
xvalue' :: (Ptr ()) -> IO ((Double))
xvalue' a1 =
let {a1' = id a1} in
xvalue''_ a1' >>= \res ->
let {res' = realToFrac res} in
return (res')
instance (impl ~ ( IO (Double))) => Op (GetXvalue ()) Positioner orig impl where
runOp _ _ positioner = withRef positioner $ \positionerPtr -> xvalue' positionerPtr
setYvalue' :: (Ptr ()) -> (Double) -> IO ()
setYvalue' a1 a2 =
let {a1' = id a1} in
let {a2' = realToFrac a2} in
setYvalue''_ a1' a2' >>
return ()
instance (impl ~ (Double -> IO ())) => Op (SetYvalue ()) Positioner orig impl where
runOp _ _ positioner yvalue = withRef positioner $ \positionerPtr -> setYvalue' positionerPtr yvalue
yvalue' :: (Ptr ()) -> IO ((Double))
yvalue' a1 =
let {a1' = id a1} in
yvalue''_ a1' >>= \res ->
let {res' = realToFrac res} in
return (res')
instance (impl ~ ( IO (Double))) => Op (GetYvalue ()) Positioner orig impl where
runOp _ _ positioner = withRef positioner $ \positionerPtr -> yvalue' positionerPtr
setXminimum' :: (Ptr ()) -> (Double) -> IO ()
setXminimum' a1 a2 =
let {a1' = id a1} in
let {a2' = realToFrac a2} in
setXminimum''_ a1' a2' >>
return ()
instance (impl ~ (Double -> IO ())) => Op (SetXminimum ()) Positioner orig impl where
runOp _ _ positioner xminimum = withRef positioner $ \positionerPtr -> setXminimum' positionerPtr xminimum
xminimum' :: (Ptr ()) -> IO ((Double))
xminimum' a1 =
let {a1' = id a1} in
xminimum''_ a1' >>= \res ->
let {res' = realToFrac res} in
return (res')
instance (impl ~ ( IO (Double))) => Op (GetXminimum ()) Positioner orig impl where
runOp _ _ positioner = withRef positioner $ \positionerPtr -> xminimum' positionerPtr
setYminimum' :: (Ptr ()) -> (Double) -> IO ()
setYminimum' a1 a2 =
let {a1' = id a1} in
let {a2' = realToFrac a2} in
setYminimum''_ a1' a2' >>
return ()
instance (impl ~ (Double -> IO ())) => Op (SetYminimum ()) Positioner orig impl where
runOp _ _ positioner yminimum = withRef positioner $ \positionerPtr -> setYminimum' positionerPtr yminimum
yminimum' :: (Ptr ()) -> IO ((Double))
yminimum' a1 =
let {a1' = id a1} in
yminimum''_ a1' >>= \res ->
let {res' = realToFrac res} in
return (res')
instance (impl ~ ( IO (Double))) => Op (GetYminimum ()) Positioner orig impl where
runOp _ _ positioner = withRef positioner $ \positionerPtr -> yminimum' positionerPtr
setXmaximum' :: (Ptr ()) -> (Double) -> IO ()
setXmaximum' a1 a2 =
let {a1' = id a1} in
let {a2' = realToFrac a2} in
setXmaximum''_ a1' a2' >>
return ()
instance (impl ~ (Double -> IO ())) => Op (SetXmaximum ()) Positioner orig impl where
runOp _ _ positioner xmaximum = withRef positioner $ \positionerPtr -> setXmaximum' positionerPtr xmaximum
xmaximum' :: (Ptr ()) -> IO ((Double))
xmaximum' a1 =
let {a1' = id a1} in
xmaximum''_ a1' >>= \res ->
let {res' = realToFrac res} in
return (res')
instance (impl ~ ( IO (Double))) => Op (GetXmaximum ()) Positioner orig impl where
runOp _ _ positioner = withRef positioner $ \positionerPtr -> xmaximum' positionerPtr
setYmaximum' :: (Ptr ()) -> (Double) -> IO ()
setYmaximum' a1 a2 =
let {a1' = id a1} in
let {a2' = realToFrac a2} in
setYmaximum''_ a1' a2' >>
return ()
instance (impl ~ (Double -> IO ())) => Op (SetYmaximum ()) Positioner orig impl where
runOp _ _ positioner ymaximum = withRef positioner $ \positionerPtr -> setYmaximum' positionerPtr ymaximum
ymaximum' :: (Ptr ()) -> IO ((Double))
ymaximum' a1 =
let {a1' = id a1} in
ymaximum''_ a1' >>= \res ->
let {res' = realToFrac res} in
return (res')
instance (impl ~ ( IO (Double))) => Op (GetYmaximum ()) Positioner orig impl where
runOp _ _ positioner = withRef positioner $ \positionerPtr -> ymaximum' positionerPtr
xbounds' :: (Ptr ()) -> (Double) -> (Double) -> IO ()
xbounds' a1 a2 a3 =
let {a1' = id a1} in
let {a2' = realToFrac a2} in
let {a3' = realToFrac a3} in
xbounds''_ a1' a2' a3' >>
return ()
instance (impl ~ (Double -> Double -> IO ())) => Op (SetXbounds ()) Positioner orig impl where
runOp _ _ positioner xstart xend = withRef positioner $ \positionerPtr -> xbounds' positionerPtr xstart xend
ybounds' :: (Ptr ()) -> (Double) -> (Double) -> IO ()
ybounds' a1 a2 a3 =
let {a1' = id a1} in
let {a2' = realToFrac a2} in
let {a3' = realToFrac a3} in
ybounds''_ a1' a2' a3' >>
return ()
instance (impl ~ (Double -> Double -> IO ())) => Op (SetYbounds ()) Positioner orig impl where
runOp _ _ positioner ystart yend = withRef positioner $ \positionerPtr -> ybounds' positionerPtr ystart yend
xstep' :: (Ptr ()) -> (Double) -> IO ()
xstep' a1 a2 =
let {a1' = id a1} in
let {a2' = realToFrac a2} in
xstep''_ a1' a2' >>
return ()
instance (impl ~ (Double -> IO ())) => Op (SetXstep ()) Positioner orig impl where
runOp _ _ positioner xstep = withRef positioner $ \positionerPtr -> xstep' positionerPtr xstep
ystep' :: (Ptr ()) -> (Double) -> IO ()
ystep' a1 a2 =
let {a1' = id a1} in
let {a2' = realToFrac a2} in
ystep''_ a1' a2' >>
return ()
instance (impl ~ (Double -> IO ())) => Op (SetYstep ()) Positioner orig impl where
runOp _ _ positioner ystep = withRef positioner $ \positionerPtr -> ystep' positionerPtr ystep
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Positioner.chs.h Fl_Positioner_New"
positionerNew''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO (C2HSImp.Ptr ()))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Positioner.chs.h Fl_Positioner_New_WithLabel"
positionerNewWithLabel''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO (C2HSImp.Ptr ())))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Positioner.chs.h Fl_Positioner_Destroy"
positionerDestroy''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Positioner.chs.h Fl_Positioner_handle"
positionerHandle''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Positioner.chs.h Fl_Positioner_set_xvalue"
setXvalue''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CDouble -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Positioner.chs.h Fl_Positioner_xvalue"
xvalue''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CDouble))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Positioner.chs.h Fl_Positioner_set_yvalue"
setYvalue''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CDouble -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Positioner.chs.h Fl_Positioner_yvalue"
yvalue''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CDouble))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Positioner.chs.h Fl_Positioner_set_xminimum"
setXminimum''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CDouble -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Positioner.chs.h Fl_Positioner_xminimum"
xminimum''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CDouble))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Positioner.chs.h Fl_Positioner_set_yminimum"
setYminimum''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CDouble -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Positioner.chs.h Fl_Positioner_yminimum"
yminimum''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CDouble))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Positioner.chs.h Fl_Positioner_set_xmaximum"
setXmaximum''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CDouble -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Positioner.chs.h Fl_Positioner_xmaximum"
xmaximum''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CDouble))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Positioner.chs.h Fl_Positioner_set_ymaximum"
setYmaximum''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CDouble -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Positioner.chs.h Fl_Positioner_ymaximum"
ymaximum''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CDouble))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Positioner.chs.h Fl_Positioner_xbounds"
xbounds''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (IO ()))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Positioner.chs.h Fl_Positioner_ybounds"
ybounds''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (IO ()))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Positioner.chs.h Fl_Positioner_xstep"
xstep''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CDouble -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Positioner.chs.h Fl_Positioner_ystep"
ystep''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CDouble -> (IO ())))