{-# LINE 1 "src/Graphics/UI/FLTK/LowLevel/Slider.chs" #-}
{-# LANGUAGE CPP, TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Graphics.UI.FLTK.LowLevel.Slider
(
sliderNew,
sliderCustom
)
where
import qualified Foreign.C.Types as C2HSImp
import qualified Foreign.Ptr as C2HSImp
import C2HS hiding (cFromEnum, cFromBool, cToBool,cToEnum)
import Graphics.UI.FLTK.LowLevel.Widget
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.Dispatch
import qualified Data.Text as T
import Graphics.UI.FLTK.LowLevel.Hierarchy
overriddenWidgetNewWithLabel' :: (Int) -> (Int) -> (Int) -> (Int) -> (T.Text) -> (Ptr ()) -> IO ((Ptr ()))
overriddenWidgetNewWithLabel' a1 a2 a3 a4 a5 a6 =
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
let {a6' = id a6} in
overriddenWidgetNewWithLabel''_ a1' a2' a3' a4' a5' a6' >>= \res ->
let {res' = id res} in
return (res')
{-# LINE 28 "src/Graphics/UI/FLTK/LowLevel/Slider.chs" #-}
overriddenWidgetNew' :: (Int) -> (Int) -> (Int) -> (Int) -> (Ptr ()) -> IO ((Ptr ()))
overriddenWidgetNew' 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' = id a5} in
overriddenWidgetNew''_ a1' a2' a3' a4' a5' >>= \res ->
let {res' = id res} in
return (res')
{-# LINE 29 "src/Graphics/UI/FLTK/LowLevel/Slider.chs" #-}
sliderCustom ::
Rectangle
-> Maybe T.Text
-> Maybe (Ref Slider -> IO ())
-> Maybe (CustomWidgetFuncs Slider)
-> IO (Ref Slider)
sliderCustom rectangle l' draw' funcs' =
widgetMaker
rectangle
l'
draw'
funcs'
overriddenWidgetNew'
overriddenWidgetNewWithLabel'
sliderNew' :: (Int) -> (Int) -> (Int) -> (Int) -> IO ((Ptr ()))
sliderNew' a1 a2 a3 a4 =
let {a1' = fromIntegral a1} in
let {a2' = fromIntegral a2} in
let {a3' = fromIntegral a3} in
let {a4' = fromIntegral a4} in
sliderNew''_ a1' a2' a3' a4' >>= \res ->
let {res' = id res} in
return (res')
{-# LINE 44 "src/Graphics/UI/FLTK/LowLevel/Slider.chs" #-}
sliderNewWithLabel' :: (Int) -> (Int) -> (Int) -> (Int) -> (T.Text) -> IO ((Ptr ()))
sliderNewWithLabel' 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
sliderNewWithLabel''_ a1' a2' a3' a4' a5' >>= \res ->
let {res' = id res} in
return (res')
{-# LINE 45 "src/Graphics/UI/FLTK/LowLevel/Slider.chs" #-}
sliderNew :: Rectangle -> Maybe T.Text -> IO (Ref Slider)
sliderNew rectangle l' =
let (x_pos, y_pos, width, height) = fromRectangle rectangle
in case l' of
Nothing -> sliderNew' x_pos y_pos width height >>=
toRef
Just l -> sliderNewWithLabel' x_pos y_pos width height l >>=
toRef
sliderDestroy' :: (Ptr ()) -> IO ((()))
sliderDestroy' a1 =
let {a1' = id a1} in
sliderDestroy''_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
{-# LINE 55 "src/Graphics/UI/FLTK/LowLevel/Slider.chs" #-}
instance (impl ~ (IO ())) => Op (Destroy ()) Slider orig impl where
runOp _ _ win = swapRef win $ \winPtr -> do
sliderDestroy' winPtr
return nullPtr
bounds' :: (Ptr ()) -> (Double) -> (Double) -> IO ((()))
bounds' a1 a2 a3 =
let {a1' = id a1} in
let {a2' = realToFrac a2} in
let {a3' = realToFrac a3} in
bounds''_ a1' a2' a3' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
{-# LINE 60 "src/Graphics/UI/FLTK/LowLevel/Slider.chs" #-}
instance (impl ~ (Double -> Double -> IO ())) => Op (Bounds ()) Slider orig impl where
runOp _ _ slider a b = withRef slider $ \sliderPtr -> bounds' sliderPtr a b
scrollvalue' :: (Ptr ()) -> (Int) -> (Int) -> (Int) -> (Int) -> IO ((Int))
scrollvalue' a1 a2 a3 a4 a5 =
let {a1' = id a1} in
let {a2' = fromIntegral a2} in
let {a3' = fromIntegral a3} in
let {a4' = fromIntegral a4} in
let {a5' = fromIntegral a5} in
scrollvalue''_ a1' a2' a3' a4' a5' >>= \res ->
let {res' = fromIntegral res} in
return (res')
{-# LINE 63 "src/Graphics/UI/FLTK/LowLevel/Slider.chs" #-}
instance (impl ~ (Int -> Int -> Int -> Int -> IO (Int))) => Op (Scrollvalue ()) Slider orig impl where
runOp _ _ slider pos slider_size first total = withRef slider $ \sliderPtr -> scrollvalue' sliderPtr pos slider_size first total
setSliderSize' :: (Ptr ()) -> IO ((Float))
setSliderSize' a1 =
let {a1' = id a1} in
setSliderSize''_ a1' >>= \res ->
let {res' = realToFrac res} in
return (res')
{-# LINE 66 "src/Graphics/UI/FLTK/LowLevel/Slider.chs" #-}
instance (impl ~ ( IO (Float))) => Op (SetSliderSize ()) Slider orig impl where
runOp _ _ slider = withRef slider $ \sliderPtr -> setSliderSize' sliderPtr
sliderSize' :: (Ptr ()) -> (Double) -> IO ((()))
sliderSize' a1 a2 =
let {a1' = id a1} in
let {a2' = realToFrac a2} in
sliderSize''_ a1' a2' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
{-# LINE 69 "src/Graphics/UI/FLTK/LowLevel/Slider.chs" #-}
instance (impl ~ (Double -> IO ())) => Op (GetSliderSize ()) Slider orig impl where
runOp _ _ slider v = withRef slider $ \sliderPtr -> sliderSize' sliderPtr v
slider' :: (Ptr ()) -> IO ((Boxtype))
slider' a1 =
let {a1' = id a1} in
slider''_ a1' >>= \res ->
let {res' = cToEnum res} in
return (res')
{-# LINE 72 "src/Graphics/UI/FLTK/LowLevel/Slider.chs" #-}
instance (impl ~ ( IO (Boxtype))) => Op (GetSlider ()) Slider orig impl where
runOp _ _ slider = withRef slider $ \sliderPtr -> slider' sliderPtr
setSlider' :: (Ptr ()) -> (Boxtype) -> IO ((()))
setSlider' a1 a2 =
let {a1' = id a1} in
let {a2' = cFromEnum a2} in
setSlider''_ a1' a2' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
{-# LINE 75 "src/Graphics/UI/FLTK/LowLevel/Slider.chs" #-}
instance (impl ~ (Boxtype -> IO ())) => Op (SetSlider ()) Slider orig impl where
runOp _ _ slider c = withRef slider $ \sliderPtr -> setSlider' sliderPtr c
setType' :: (Ptr ()) -> (Word8) -> IO ((()))
setType' a1 a2 =
let {a1' = id a1} in
let {a2' = fromIntegral a2} in
setType''_ a1' a2' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
{-# LINE 78 "src/Graphics/UI/FLTK/LowLevel/Slider.chs" #-}
instance (impl ~ (SliderType -> IO ())) => Op (SetType ()) Slider orig impl where
runOp _ _ widget t = withRef widget $ \widgetPtr -> setType' widgetPtr (fromInteger $ toInteger $ fromEnum t)
type' :: (Ptr ()) -> IO ((Word8))
type' a1 =
let {a1' = id a1} in
type''_ a1' >>= \res ->
let {res' = fromIntegral res} in
return (res')
{-# LINE 81 "src/Graphics/UI/FLTK/LowLevel/Slider.chs" #-}
instance (impl ~ IO (SliderType)) => Op (GetType_ ()) Slider orig impl where
runOp _ _ widget = withRef widget $ \widgetPtr -> type' widgetPtr >>= return . toEnum . fromInteger . toInteger
draw'' :: (Ptr ()) -> IO ()
draw'' a1 =
let {a1' = id a1} in
draw'''_ a1' >>
return ()
{-# LINE 85 "src/Graphics/UI/FLTK/LowLevel/Slider.chs" #-}
instance (impl ~ ( IO ())) => Op (Draw ()) Slider orig impl where
runOp _ _ slider = withRef slider $ \sliderPtr -> draw'' sliderPtr
drawSuper' :: (Ptr ()) -> IO ((()))
drawSuper' a1 =
let {a1' = id a1} in
drawSuper''_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
{-# LINE 88 "src/Graphics/UI/FLTK/LowLevel/Slider.chs" #-}
instance (impl ~ ( IO ())) => Op (DrawSuper ()) Slider orig impl where
runOp _ _ slider = withRef slider $ \sliderPtr -> drawSuper' sliderPtr
sliderHandle' :: (Ptr ()) -> (CInt) -> IO ((Int))
sliderHandle' a1 a2 =
let {a1' = id a1} in
let {a2' = id a2} in
sliderHandle''_ a1' a2' >>= \res ->
let {res' = fromIntegral res} in
return (res')
{-# LINE 91 "src/Graphics/UI/FLTK/LowLevel/Slider.chs" #-}
instance (impl ~ (Event -> IO (Either UnknownEvent ()))) => Op (Handle ()) Slider orig impl where
runOp _ _ slider event = withRef slider (\p -> sliderHandle' p (fromIntegral . fromEnum $ event)) >>= return . successOrUnknownEvent
handleSuper' :: (Ptr ()) -> (Int) -> IO ((Int))
handleSuper' a1 a2 =
let {a1' = id a1} in
let {a2' = fromIntegral a2} in
handleSuper''_ a1' a2' >>= \res ->
let {res' = fromIntegral res} in
return (res')
{-# LINE 94 "src/Graphics/UI/FLTK/LowLevel/Slider.chs" #-}
instance (impl ~ (Event -> IO (Either UnknownEvent ()))) => Op (HandleSuper ()) Slider orig impl where
runOp _ _ slider event = withRef slider $ \sliderPtr -> handleSuper' sliderPtr (fromIntegral (fromEnum event)) >>= return . successOrUnknownEvent
resize' :: (Ptr ()) -> (Int) -> (Int) -> (Int) -> (Int) -> IO ((()))
resize' a1 a2 a3 a4 a5 =
let {a1' = id a1} in
let {a2' = fromIntegral a2} in
let {a3' = fromIntegral a3} in
let {a4' = fromIntegral a4} in
let {a5' = fromIntegral a5} in
resize''_ a1' a2' a3' a4' a5' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
{-# LINE 97 "src/Graphics/UI/FLTK/LowLevel/Slider.chs" #-}
instance (impl ~ (Rectangle -> IO ())) => Op (Resize ()) Slider orig impl where
runOp _ _ slider rectangle = withRef slider $ \sliderPtr -> do
let (x_pos,y_pos,w_pos,h_pos) = fromRectangle rectangle
resize' sliderPtr x_pos y_pos w_pos h_pos
resizeSuper' :: (Ptr ()) -> (Int) -> (Int) -> (Int) -> (Int) -> IO ((()))
resizeSuper' a1 a2 a3 a4 a5 =
let {a1' = id a1} in
let {a2' = fromIntegral a2} in
let {a3' = fromIntegral a3} in
let {a4' = fromIntegral a4} in
let {a5' = fromIntegral a5} in
resizeSuper''_ a1' a2' a3' a4' a5' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
{-# LINE 102 "src/Graphics/UI/FLTK/LowLevel/Slider.chs" #-}
instance (impl ~ (Rectangle -> IO ())) => Op (ResizeSuper ()) Slider orig impl where
runOp _ _ slider rectangle =
let (x_pos, y_pos, width, height) = fromRectangle rectangle
in withRef slider $ \sliderPtr -> resizeSuper' sliderPtr x_pos y_pos width height
hide' :: (Ptr ()) -> IO ()
hide' a1 =
let {a1' = id a1} in
hide''_ a1' >>
return ()
{-# LINE 107 "src/Graphics/UI/FLTK/LowLevel/Slider.chs" #-}
instance (impl ~ ( IO ())) => Op (Hide ()) Slider orig impl where
runOp _ _ slider = withRef slider $ \sliderPtr -> hide' sliderPtr
hideSuper' :: (Ptr ()) -> IO ((()))
hideSuper' a1 =
let {a1' = id a1} in
hideSuper''_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
{-# LINE 110 "src/Graphics/UI/FLTK/LowLevel/Slider.chs" #-}
instance (impl ~ ( IO ())) => Op (HideSuper ()) Slider orig impl where
runOp _ _ slider = withRef slider $ \sliderPtr -> hideSuper' sliderPtr
show' :: (Ptr ()) -> IO ()
show' a1 =
let {a1' = id a1} in
show''_ a1' >>
return ()
{-# LINE 113 "src/Graphics/UI/FLTK/LowLevel/Slider.chs" #-}
instance (impl ~ ( IO ())) => Op (ShowWidget ()) Slider orig impl where
runOp _ _ slider = withRef slider $ \sliderPtr -> show' sliderPtr
showSuper' :: (Ptr ()) -> IO ((()))
showSuper' a1 =
let {a1' = id a1} in
showSuper''_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
{-# LINE 116 "src/Graphics/UI/FLTK/LowLevel/Slider.chs" #-}
instance (impl ~ ( IO ())) => Op (ShowWidgetSuper ()) Slider orig impl where
runOp _ _ slider = withRef slider $ \sliderPtr -> showSuper' sliderPtr
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Slider.chs.h Fl_OverriddenSlider_New_WithLabel"
overriddenWidgetNewWithLabel''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr ()))))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Slider.chs.h Fl_OverriddenSlider_New"
overriddenWidgetNew''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr ())))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Slider.chs.h Fl_Slider_New"
sliderNew''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO (C2HSImp.Ptr ()))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Slider.chs.h Fl_Slider_New_WithLabel"
sliderNewWithLabel''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO (C2HSImp.Ptr ())))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Slider.chs.h Fl_Slider_Destroy"
sliderDestroy''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Slider.chs.h Fl_Slider_bounds"
bounds''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (IO ()))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Slider.chs.h Fl_Slider_scrollvalue"
scrollvalue''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO C2HSImp.CInt))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Slider.chs.h Fl_Slider_set_slider_size"
setSliderSize''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CFloat))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Slider.chs.h Fl_Slider_slider_size"
sliderSize''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CDouble -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Slider.chs.h Fl_Slider_slider"
slider''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Slider.chs.h Fl_Slider_set_slider"
setSlider''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Slider.chs.h Fl_Widget_set_type"
setType''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CUChar -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Slider.chs.h Fl_Widget_type"
type''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CUChar))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Slider.chs.h Fl_Slider_draw"
draw'''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Slider.chs.h Fl_Slider_draw_super"
drawSuper''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Slider.chs.h Fl_Slider_handle"
sliderHandle''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Slider.chs.h Fl_Slider_handle_super"
handleSuper''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Slider.chs.h Fl_Slider_resize"
resize''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO ()))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Slider.chs.h Fl_Slider_resize_super"
resizeSuper''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO ()))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Slider.chs.h Fl_Slider_hide"
hide''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Slider.chs.h Fl_Slider_hide_super"
hideSuper''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Slider.chs.h Fl_Slider_show"
show''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Slider.chs.h Fl_Slider_show_super"
showSuper''_ :: ((C2HSImp.Ptr ()) -> (IO ()))