{-# LINE 1 "src/Graphics/UI/FLTK/LowLevel/Scrolled.chs" #-}
{-# LANGUAGE CPP, ExistentialQuantification, TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts, ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Graphics.UI.FLTK.LowLevel.Scrolled
(
scrolledNew,
scrolledCustom
)
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_Types
import Graphics.UI.FLTK.LowLevel.Utils
import Graphics.UI.FLTK.LowLevel.Hierarchy
import Graphics.UI.FLTK.LowLevel.Dispatch
import qualified Data.Text as T
import Graphics.UI.FLTK.LowLevel.Fl_Enumerations
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/Scrolled.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/Scrolled.chs" #-}
scrolledCustom ::
Rectangle
-> Maybe T.Text
-> Maybe (Ref Scrolled -> IO ())
-> Maybe (CustomWidgetFuncs Scrolled)
-> IO (Ref Scrolled)
scrolledCustom rectangle l' draw' funcs' =
widgetMaker
rectangle
l'
draw'
funcs'
overriddenWidgetNew'
overriddenWidgetNewWithLabel'
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')
{-# LINE 46 "src/Graphics/UI/FLTK/LowLevel/Scrolled.chs" #-}
scrollNewWithLabel' :: (Int) -> (Int) -> (Int) -> (Int) -> (T.Text) -> 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')
{-# LINE 47 "src/Graphics/UI/FLTK/LowLevel/Scrolled.chs" #-}
scrolledNew :: Rectangle -> Maybe T.Text -> 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 ()
{-# LINE 56 "src/Graphics/UI/FLTK/LowLevel/Scrolled.chs" #-}
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')
{-# LINE 59 "src/Graphics/UI/FLTK/LowLevel/Scrolled.chs" #-}
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 ()
{-# LINE 62 "src/Graphics/UI/FLTK/LowLevel/Scrolled.chs" #-}
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 ()
{-# LINE 65 "src/Graphics/UI/FLTK/LowLevel/Scrolled.chs" #-}
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')
{-# LINE 68 "src/Graphics/UI/FLTK/LowLevel/Scrolled.chs" #-}
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')
{-# LINE 71 "src/Graphics/UI/FLTK/LowLevel/Scrolled.chs" #-}
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')
{-# LINE 74 "src/Graphics/UI/FLTK/LowLevel/Scrolled.chs" #-}
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 ()
{-# LINE 77 "src/Graphics/UI/FLTK/LowLevel/Scrolled.chs" #-}
instance (impl ~ (ScrollbarMode -> IO ())) => Op (SetType ()) Scrolled orig impl where
runOp _ _ widget t = withRef widget $ \widgetPtr -> setType' widgetPtr (cFromEnum t)
draw'' :: (Ptr ()) -> IO ()
draw'' a1 =
let {a1' = id a1} in
draw'''_ a1' >>
return ()
{-# LINE 80 "src/Graphics/UI/FLTK/LowLevel/Scrolled.chs" #-}
instance (impl ~ ( IO ())) => Op (Draw ()) Scrolled orig impl where
runOp _ _ scrolled = withRef scrolled $ \scrolledPtr -> draw'' scrolledPtr
drawSuper' :: (Ptr ()) -> IO ((()))
drawSuper' a1 =
let {a1' = id a1} in
drawSuper''_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
{-# LINE 83 "src/Graphics/UI/FLTK/LowLevel/Scrolled.chs" #-}
instance (impl ~ ( IO ())) => Op (DrawSuper ()) Scrolled orig impl where
runOp _ _ scrolled = withRef scrolled $ \scrolledPtr -> drawSuper' scrolledPtr
scrolledHandle' :: (Ptr ()) -> (CInt) -> IO ((Int))
scrolledHandle' a1 a2 =
let {a1' = id a1} in
let {a2' = id a2} in
scrolledHandle''_ a1' a2' >>= \res ->
let {res' = fromIntegral res} in
return (res')
{-# LINE 86 "src/Graphics/UI/FLTK/LowLevel/Scrolled.chs" #-}
instance (impl ~ (Event -> IO (Either UnknownEvent ()))) => Op (Handle ()) Scrolled orig impl where
runOp _ _ scrolled event = withRef scrolled (\p -> scrolledHandle' 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 89 "src/Graphics/UI/FLTK/LowLevel/Scrolled.chs" #-}
instance (impl ~ (Event -> IO (Either UnknownEvent ()))) => Op (HandleSuper ()) Scrolled orig impl where
runOp _ _ scrolled event = withRef scrolled $ \scrolledPtr -> handleSuper' scrolledPtr (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 92 "src/Graphics/UI/FLTK/LowLevel/Scrolled.chs" #-}
instance (impl ~ (Rectangle -> IO ())) => Op (Resize ()) Scrolled orig impl where
runOp _ _ scrolled rectangle = withRef scrolled $ \scrolledPtr -> do
let (x_pos,y_pos,w_pos,h_pos) = fromRectangle rectangle
resize' scrolledPtr 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 97 "src/Graphics/UI/FLTK/LowLevel/Scrolled.chs" #-}
instance (impl ~ (Rectangle -> IO ())) => Op (ResizeSuper ()) Scrolled orig impl where
runOp _ _ scrolled rectangle =
let (x_pos, y_pos, width, height) = fromRectangle rectangle
in withRef scrolled $ \scrolledPtr -> resizeSuper' scrolledPtr x_pos y_pos width height
hide' :: (Ptr ()) -> IO ()
hide' a1 =
let {a1' = id a1} in
hide''_ a1' >>
return ()
{-# LINE 102 "src/Graphics/UI/FLTK/LowLevel/Scrolled.chs" #-}
instance (impl ~ ( IO ())) => Op (Hide ()) Scrolled orig impl where
runOp _ _ scrolled = withRef scrolled $ \scrolledPtr -> hide' scrolledPtr
hideSuper' :: (Ptr ()) -> IO ((()))
hideSuper' a1 =
let {a1' = id a1} in
hideSuper''_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
{-# LINE 105 "src/Graphics/UI/FLTK/LowLevel/Scrolled.chs" #-}
instance (impl ~ ( IO ())) => Op (HideSuper ()) Scrolled orig impl where
runOp _ _ scrolled = withRef scrolled $ \scrolledPtr -> hideSuper' scrolledPtr
show' :: (Ptr ()) -> IO ()
show' a1 =
let {a1' = id a1} in
show''_ a1' >>
return ()
{-# LINE 108 "src/Graphics/UI/FLTK/LowLevel/Scrolled.chs" #-}
instance (impl ~ ( IO ())) => Op (ShowWidget ()) Scrolled orig impl where
runOp _ _ scrolled = withRef scrolled $ \scrolledPtr -> show' scrolledPtr
showSuper' :: (Ptr ()) -> IO ((()))
showSuper' a1 =
let {a1' = id a1} in
showSuper''_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
{-# LINE 111 "src/Graphics/UI/FLTK/LowLevel/Scrolled.chs" #-}
instance (impl ~ ( IO ())) => Op (ShowWidgetSuper ()) Scrolled orig impl where
runOp _ _ scrolled = withRef scrolled $ \scrolledPtr -> showSuper' scrolledPtr
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Scrolled.chs.h Fl_OverriddenScroll_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/Scrolled.chs.h Fl_OverriddenScroll_New"
overriddenWidgetNew''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr ())))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Scrolled.chs.h Fl_Scroll_New"
scrollNew''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO (C2HSImp.Ptr ()))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Scrolled.chs.h Fl_Scroll_New_WithLabel"
scrollNewWithLabel''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO (C2HSImp.Ptr ())))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Scrolled.chs.h Fl_Scroll_set_scrollbar_size"
setScrollbarSize''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Scrolled.chs.h Fl_Scroll_get_scrollbar_size"
getScrollbarSize''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Scrolled.chs.h Fl_Scroll_clear"
clear''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Scrolled.chs.h Fl_Scroll_scroll_to"
scrollTo''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO ()))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Scrolled.chs.h Fl_Scroll_yposition"
yposition''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Scrolled.chs.h Fl_Scroll_xposition"
xposition''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Scrolled.chs.h Fl_Scroll_type"
type''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CUChar))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Scrolled.chs.h Fl_Scroll_set_type"
setType''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CUChar -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Scrolled.chs.h Fl_Scroll_draw"
draw'''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Scrolled.chs.h Fl_Scroll_draw_super"
drawSuper''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Scrolled.chs.h Fl_Scroll_handle"
scrolledHandle''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Scrolled.chs.h Fl_Scroll_handle_super"
handleSuper''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Scrolled.chs.h Fl_Scroll_resize"
resize''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO ()))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Scrolled.chs.h Fl_Scroll_resize_super"
resizeSuper''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO ()))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Scrolled.chs.h Fl_Scroll_hide"
hide''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Scrolled.chs.h Fl_Scroll_hide_super"
hideSuper''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Scrolled.chs.h Fl_Scroll_show"
show''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Scrolled.chs.h Fl_Scroll_show_super"
showSuper''_ :: ((C2HSImp.Ptr ()) -> (IO ()))