module Graphics.UI.FLTK.LowLevel.Scrolled
(
scrolledNew,
)
where
import C2HS hiding (cFromEnum, cFromBool, cToBool,cToEnum)
import Foreign.C.Types
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
scrollNew' :: (Int) -> (Int) -> (Int) -> (Int) -> IO ((Ptr ()))
scrollNew' a1 a2 a3 a4 =
let {a1' = fromIntegral a1} in
let {a2' = fromIntegral a2} in
let {a3' = fromIntegral a3} in
let {a4' = fromIntegral a4} in
scrollNew''_ a1' a2' a3' a4' >>= \res ->
let {res' = id res} in
return (res')
scrollNewWithLabel' :: (Int) -> (Int) -> (Int) -> (Int) -> (String) -> IO ((Ptr ()))
scrollNewWithLabel' 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
scrollNewWithLabel''_ a1' a2' a3' a4' a5' >>= \res ->
let {res' = id res} in
return (res')
scrolledNew :: Rectangle -> Maybe String -> IO (Ref Scrolled)
scrolledNew rectangle l'=
let (x_pos, y_pos, width, height) = fromRectangle rectangle
in case l' of
Nothing -> scrollNew' x_pos y_pos width height >>=
toRef
Just l -> scrollNewWithLabel' x_pos y_pos width height l >>=
toRef
setScrollbarSize' :: (Ptr ()) -> (Int) -> IO ()
setScrollbarSize' a1 a2 =
let {a1' = id a1} in
let {a2' = fromIntegral a2} in
setScrollbarSize''_ a1' a2' >>
return ()
instance (impl ~ (Int -> IO ())) => Op (SetScrollbarSize ()) Scrolled orig impl where
runOp _ _ widget size = withRef widget $ \widgetPtr -> setScrollbarSize' widgetPtr size
getScrollbarSize' :: (Ptr ()) -> IO ((Int))
getScrollbarSize' a1 =
let {a1' = id a1} in
getScrollbarSize''_ a1' >>= \res ->
let {res' = fromIntegral res} in
return (res')
instance (impl ~ ( IO (Int))) => Op (GetScrollbarSize ()) Scrolled orig impl where
runOp _ _ widget = withRef widget $ \widgetPtr -> getScrollbarSize' widgetPtr
clear' :: (Ptr ()) -> IO ()
clear' a1 =
let {a1' = id a1} in
clear''_ a1' >>
return ()
instance (impl ~ ( IO ())) => Op (Clear ()) Scrolled orig impl where
runOp _ _ widget = withRef widget $ \widgetPtr -> clear' widgetPtr
scrollTo' :: (Ptr ()) -> (Int) -> (Int) -> IO ()
scrollTo' a1 a2 a3 =
let {a1' = id a1} in
let {a2' = fromIntegral a2} in
let {a3' = fromIntegral a3} in
scrollTo''_ a1' a2' a3' >>
return ()
instance (impl ~ (Position -> IO ())) => Op (ScrollTo ()) Scrolled orig impl where
runOp _ _ widget (Position (X x_pos') (Y y_pos')) = withRef widget $ \widgetPtr -> scrollTo' widgetPtr x_pos' y_pos'
yposition' :: (Ptr ()) -> IO ((Int))
yposition' a1 =
let {a1' = id a1} in
yposition''_ a1' >>= \res ->
let {res' = fromIntegral res} in
return (res')
instance (impl ~ ( IO (Int))) => Op (Yposition ()) Scrolled orig impl where
runOp _ _ widget = withRef widget $ \widgetPtr -> yposition' widgetPtr
xposition' :: (Ptr ()) -> IO ((Int))
xposition' a1 =
let {a1' = id a1} in
xposition''_ a1' >>= \res ->
let {res' = fromIntegral res} in
return (res')
instance (impl ~ ( IO (Int))) => Op (Xposition ()) Scrolled orig impl where
runOp _ _ widget = withRef widget $ \widgetPtr -> xposition' widgetPtr
type' :: (Ptr ()) -> IO ((Word8))
type' a1 =
let {a1' = id a1} in
type''_ a1' >>= \res ->
let {res' = fromIntegral res} in
return (res')
instance (impl ~ ( IO (ScrollbarMode))) => Op (GetType_ ()) Scrolled orig impl where
runOp _ _ widget = withRef widget $ \widgetPtr -> type' widgetPtr >>= return . cToEnum
setType' :: (Ptr ()) -> (Word8) -> IO ()
setType' a1 a2 =
let {a1' = id a1} in
let {a2' = fromIntegral a2} in
setType''_ a1' a2' >>
return ()
instance (impl ~ (ScrollbarMode -> IO ())) => Op (SetType ()) Scrolled orig impl where
runOp _ _ widget t = withRef widget $ \widgetPtr -> setType' widgetPtr (cFromEnum t)
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' >>
return ()
instance (impl ~ (Rectangle -> IO ())) => Op (Resize ()) Scrolled orig impl where
runOp _ _ widget rectangle = let (x_pos', y_pos', width', height') = fromRectangle rectangle in withRef widget $ \scrollPtr -> resize' scrollPtr x_pos' y_pos' width' height'
handle' :: (Ptr ()) -> (Int) -> IO ((Int))
handle' a1 a2 =
let {a1' = id a1} in
let {a2' = fromIntegral a2} in
handle''_ a1' a2' >>= \res ->
let {res' = fromIntegral res} in
return (res')
instance (impl ~ (Int -> IO (Int))) => Op (Handle ()) Scrolled orig impl where
runOp _ _ widget event = withRef widget $ \scrollPtr -> handle' scrollPtr event
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Scrolled.chs.h Fl_Scroll_New"
scrollNew''_ :: (CInt -> (CInt -> (CInt -> (CInt -> (IO (Ptr ()))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Scrolled.chs.h Fl_Scroll_New_WithLabel"
scrollNewWithLabel''_ :: (CInt -> (CInt -> (CInt -> (CInt -> ((Ptr CChar) -> (IO (Ptr ())))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Scrolled.chs.h Fl_Scroll_set_scrollbar_size"
setScrollbarSize''_ :: ((Ptr ()) -> (CInt -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Scrolled.chs.h Fl_Scroll_get_scrollbar_size"
getScrollbarSize''_ :: ((Ptr ()) -> (IO CInt))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Scrolled.chs.h Fl_Scroll_clear"
clear''_ :: ((Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Scrolled.chs.h Fl_Scroll_scroll_to"
scrollTo''_ :: ((Ptr ()) -> (CInt -> (CInt -> (IO ()))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Scrolled.chs.h Fl_Scroll_yposition"
yposition''_ :: ((Ptr ()) -> (IO CInt))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Scrolled.chs.h Fl_Scroll_xposition"
xposition''_ :: ((Ptr ()) -> (IO CInt))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Scrolled.chs.h Fl_Scroll_type"
type''_ :: ((Ptr ()) -> (IO CUChar))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Scrolled.chs.h Fl_Scroll_set_type"
setType''_ :: ((Ptr ()) -> (CUChar -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Scrolled.chs.h Fl_Scroll_resize"
resize''_ :: ((Ptr ()) -> (CInt -> (CInt -> (CInt -> (CInt -> (IO ()))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Scrolled.chs.h Fl_Scroll_handle"
handle''_ :: ((Ptr ()) -> (CInt -> (IO CInt)))