{-# LINE 1 "src/Graphics/UI/FLTK/LowLevel/Base/Scrolled.chs" #-}
{-# LANGUAGE CPP, ExistentialQuantification, TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts, ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Graphics.UI.FLTK.LowLevel.Base.Scrolled
(
scrolledNew,
scrolledCustom
, drawScrolledBase
, handleScrolledBase
, resizeScrolledBase
, hideScrolledBase
, showWidgetScrolledBase
)
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.Base.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 a3 :: Int
as T
import Graphics.UI.FLTK.LowLevel.Fl_Enumerations
overriddenWidgetNewWithLabel' :: (Int) -> (Int) -> (Int) -> (Int) -> (CString) -> (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
(flip ($)) a5 $ \a5' ->
let {a6' = id a6} in
overriddenWidgetNewWithLabel''_ a1' a2' a3' a4' a5' a6' >>= \res ->
let {res' = id res} in
return (res')
{-# LINE 33 "src/Graphics/UI/FLTK/LowLevel/Base/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 34 "src/Graphics/UI/FLTK/LowLevel/Base/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' :: Int -> Int -> Int -> Int -> IO (Ptr ())
scrollNew' a1 :: Int
a1 a2 :: Int
a2 a3 :: Int
a3 a4 :: Int
a4 =
let {a1' :: CInt
a1' = Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a1} in
let {a2' :: CInt
a2' = Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a2} in
let {a3' :: CInt
a3' = Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a3} in
let {a4' :: CInt
a4' = Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a4} in
CInt -> CInt -> CInt -> CInt -> IO (Ptr ())
scrollNew''_ CInt
a1' CInt
a2' CInt
a3' CInt
a4' IO (Ptr ()) -> (Ptr () -> IO (Ptr ())) -> IO (Ptr ())
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \res :: Ptr ()
res ->
let {res' :: Ptr ()
res' = Ptr () -> Ptr ()
forall a. a -> a
id Ptr ()
res} in
Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return (Ptr ()
res')
{-# LINE 51 "src/Graphics/UI/FLTK/LowLevel/Base/Scrolled.chs" #-}
scrollNewWithLabel' :: (Int) -> (Int) -> (Int) -> (Int) -> (CString) -> 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
(flip ($)) a5 $ \a5' ->
scrollNewWithLabel''_ a1' a2' a3' a4' a5' >>= \res ->
let {res' = id res} in
return (res')
{-# LINE 52 "src/Graphics/UI/FLTK/LowLevel/Base/Scrolled.chs" #-}
scrolledNew :: Rectangle -> Maybe T.Text -> IO (Ref Scrolled)
scrolledNew rectangle l'=
widgetMaker
rectangle
l'
Nothing
Nothing
overriddenWidgetNew'
overriddenWidgetNewWithLabel'
setScrollbarSize' :: (Ptr ()) -> (Int) -> IO ()
setScrollbarSize' a1 a2 =
let {a1' = id a1} in
let {a2' = fromIntegral a2} in
setScrollbarSize''_ a1' a2' >>
return ()
{-# LINE 62 "src/Graphics/UI/FLTK/LowLevel/Base/Scrolled.chs" #-}
instance (impl ~ (Int -> IO ())) => Op (SetScrollbarSize ()) ScrolledBase 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 65 "src/Graphics/UI/FLTK/LowLevel/Base/Scrolled.chs" #-}
instance (impl ~ ( IO (Int))) => Op (GetScrollbarSize ()) ScrolledBase orig impl where
runOp _ _ widget = withRef widget $ \widgetPtr -> getScrollbarSize' widgetPtr
clear' :: (Ptr ()) -> IO ()
clear' a1 =
let {a1' = id a1} in
clear''_ a1' >>
return ()
{-# LINE 68 "src/Graphics/UI/FLTK/LowLevel/Base/Scrolled.chs" #-}
instance (impl ~ ( IO ())) => Op (Clear ()) ScrolledBase 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 71 "src/Graphics/UI/FLTK/LowLevel/Base/Scrolled.chs" #-}
instance (impl ~ (Position -> IO ())) => Op (ScrollTo ()) ScrolledBase 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 74 "src/Graphics/UI/FLTK/LowLevel/Base/Scrolled.chs" #-}
instance (impl ~ ( IO (Int))) => Op (Yposition ()) ScrolledBase 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 77 "src/Graphics/UI/FLTK/LowLevel/Base/Scrolled.chs" #-}
instance (impl ~ ( IO (Int))) => Op (Xposition ()) ScrolledBase 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 80 "src/Graphics/UI/FLTK/LowLevel/Base/Scrolled.chs" #-}
instance (impl ~ ( IO (ScrollbarMode))) => Op (GetType_ ()) ScrolledBase 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 83 "src/Graphics/UI/FLTK/LowLevel/Base/Scrolled.chs" #-}
instance (impl ~ (ScrollbarMode -> IO ())) => Op (SetType ()) ScrolledBase orig impl where
runOp _ _ widget t = withRef widget $ \widgetPtr -> setType' widgetPtr (cFromEnum t)
drawSuper' :: (Ptr ()) -> IO ((()))
drawSuper' a1 =
let {a1' = id a1} in
drawSuper''_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
{-# LINE 87 "src/Graphics/UI/FLTK/LowLevel/Base/Scrolled.chs" #-}
drawScrolledBase :: Ref ScrolledBase -> IO ()
drawScrolledBase scrolled = withRef scrolled $ \scrolledPtr -> drawSuper' scrolledPtr
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 90 "src/Graphics/UI/FLTK/LowLevel/Base/Scrolled.chs" #-}
handleScrolledBase :: Ref ScrolledBase -> Event -> IO (Either UnknownEvent ())
handleScrolledBase scrolled event = withRef scrolled $ \scrolledPtr -> handleSuper' scrolledPtr (fromIntegral (fromEnum event)) >>= return . successOrUnknownEvent
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 93 "src/Graphics/UI/FLTK/LowLevel/Base/Scrolled.chs" #-}
resizeScrolledBase :: Ref ScrolledBase -> Rectangle -> IO ()
resizeScrolledBase scrolled rectangle =
let (x_pos, y_pos, width, height) = fromRectangle rectangle
in withRef scrolled $ \scrolledPtr -> resizeSuper' scrolledPtr x_pos y_pos width height
hideSuper' :: (Ptr ()) -> IO ((()))
hideSuper' a1 =
let {a1' = id a1} in
hideSuper''_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
{-# LINE 98 "src/Graphics/UI/FLTK/LowLevel/Base/Scrolled.chs" #-}
hideScrolledBase :: Ref ScrolledBase -> IO ()
hideScrolledBase scrolled = withRef scrolled $ \scrolledPtr -> hideSuper' scrolledPtr
showSuper' :: (Ptr ()) -> IO ((()))
showSuper' a1 =
let {a1' = id a1} in
showSuper''_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
{-# LINE 101 "src/Graphics/UI/FLTK/LowLevel/Base/Scrolled.chs" #-}
showWidgetScrolledBase :: Ref ScrolledBase -> IO ()
showWidgetScrolledBase scrolled = withRef scrolled $ \scrolledPtr -> showSuper' scrolledPtr
draw'' :: (Ptr ()) -> IO ()
draw'' a1 =
let {a1' = id a1} in
draw'''_ a1' >>
return ()
{-# LINE 105 "src/Graphics/UI/FLTK/LowLevel/Base/Scrolled.chs" #-}
instance (impl ~ ( IO ())) => Op (Draw ()) ScrolledBase orig impl where
runOp _ _ scrolled = withRef scrolled $ \scrolledPtr -> draw'' 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 108 "src/Graphics/UI/FLTK/LowLevel/Base/Scrolled.chs" #-}
instance (impl ~ (Event -> IO (Either UnknownEvent ()))) => Op (Handle ()) ScrolledBase orig impl where
runOp _ _ scrolled event = withRef scrolled (\p -> scrolledHandle' p (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 111 "src/Graphics/UI/FLTK/LowLevel/Base/Scrolled.chs" #-}
instance (impl ~ (Rectangle -> IO ())) => Op (Resize ()) ScrolledBase 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
hide' :: (Ptr ()) -> IO ()
hide' a1 =
let {a1' = id a1} in
hide''_ a1' >>
return ()
{-# LINE 116 "src/Graphics/UI/FLTK/LowLevel/Base/Scrolled.chs" #-}
instance (impl ~ ( IO ())) => Op (Hide ()) ScrolledBase orig impl where
runOp _ _ scrolled = withRef scrolled $ \scrolledPtr -> hide' scrolledPtr
show' :: (Ptr ()) -> IO ()
show' a1 =
let {a1' = id a1} in
show''_ a1' >>
return ()
{-# LINE 119 "src/Graphics/UI/FLTK/LowLevel/Base/Scrolled.chs" #-}
instance (impl ~ ( IO ())) => Op (ShowWidget ()) ScrolledBase orig impl where
runOp _ _ scrolled = withRef scrolled $ \scrolledPtr -> show' scrolledPtr
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/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/Base/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/Base/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/Base/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/Base/Scrolled.chs.h Fl_Scroll_set_scrollbar_size"
setScrollbarSize''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Scrolled.chs.h Fl_Scroll_get_scrollbar_size"
getScrollbarSize''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Scrolled.chs.h Fl_Scroll_clear"
clear''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Scrolled.chs.h Fl_Scroll_scroll_to"
scrollTo''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO ()))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Scrolled.chs.h Fl_Scroll_yposition"
yposition''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Scrolled.chs.h Fl_Scroll_xposition"
xposition''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Scrolled.chs.h Fl_Scroll_type"
type''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CUChar))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Scrolled.chs.h Fl_Scroll_set_type"
setType''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CUChar -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Scrolled.chs.h Fl_Scroll_draw_super"
drawSuper''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Scrolled.chs.h Fl_Scroll_handle_super"
handleSuper''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/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/Base/Scrolled.chs.h Fl_Scroll_hide_super"
hideSuper''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Scrolled.chs.h Fl_Scroll_show_super"
showSuper''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Scrolled.chs.h Fl_Scroll_draw"
draw'''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Scrolled.chs.h Fl_Scroll_handle"
scrolledHandle''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/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/Base/Scrolled.chs.h Fl_Scroll_hide"
hide''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Scrolled.chs.h Fl_Scroll_show"
show''_ :: ((C2HSImp.Ptr ()) -> (IO ()))