{-# LINE 1 "src/Graphics/UI/FLTK/LowLevel/Base/Tile.chs" #-}
{-# LANGUAGE CPP, RankNTypes, UndecidableInstances, GADTs, TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts, ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Graphics.UI.FLTK.LowLevel.Base.Tile
(
tileNew,
tileCustom
, drawTileBase
, handleTileBase
, resizeTileBase
, hideTileBase
, showWidgetTileBase
)
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_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
import qualified Data.Text a3 :: Int
as T
overriddenWidgetNewWithLabel' :: (Int) -> (Int) -> (Int) -> (Int) -> (CString) -> (Ptr ()) -> IO ((Ptr ()))
overriddenWidgetNewWithLabel' a1 a2 a3 a4 a5 a6 =
let {a1' = fromIntegral a1} in
let {a2' = forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
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 35 "src/Graphics/UI/FLTK/LowLevel/Base/Tile.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 36 "src/Graphics/UI/FLTK/LowLevel/Base/Tile.chs" #-}
tileCustom ::
Rectangle
-> Maybe T.Text
-> Maybe (Ref Tile -> IO ())
-> Maybe (CustomWidgetFuncs Tile)
-> IO (Ref Tile)
tileCustom rectangle l' draw' funcs' =
widgetMaker
rectangle
l'
draw'
funcs'
overriddenWidgetNew'
overriddenWidgetNewWithLabel'
tileNew' :: (Int) -> (Int) -> (Int) -> (Int) -> IO ((Ptr ()))
tileNew' :: Int -> Int -> Int -> Int -> IO (Ptr ())
tileNew' 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' = fromIntegral a2} in
let {a2' :: CInt
a3' = Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a3} in
let {a4' = fromIntegral a4} in
tileNew''_ a1' a2' a3' a4' >>= \res ->
let {res' = id res} in
return (res')
{-# LINE 53 "src/Graphics/UI/FLTK/LowLevel/Base/Tile.chs" #-}
tileNewWithLabel' :: (Int) -> (Int) -> (Int) -> (Int) -> (CString) -> IO ((Ptr ()))
tileNewWithLabel' 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' ->
tileNewWithLabel''_ a1' a2' a3' a4' a5' >>= \res ->
let {res' = id res} in
return (res')
{-# LINE 54 "src/Graphics/UI/FLTK/LowLevel/Base/Tile.chs" #-}
tileNew :: Rectangle -> Maybe T.Text -> IO (Ref Tile)
tileNew rectangle l'=
widgetMaker
rectangle
l'
Nothing
Nothing
overriddenWidgetNew'
overriddenWidgetNewWithLabel'
setPosition' :: (Ptr ()) -> (Int) -> (Int) -> (Int) -> (Int) -> IO ()
setPosition' :: Ptr () -> Int -> Int -> Int -> Int -> IO ()
setPosition' a1 a2 :: Int
a2 a3 :: Int
a3 a4 :: Int
a4 a5 :: Int
a5 =
let {a1' = id a1} in
let {a2' = fromIntegral a2} in
let {a3' = fromIntegral a3} in
let {a4' :: CInt
a4' = Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a4} in
let {a5' :: CInt
a5' = Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a5} in
Ptr () -> CInt -> CInt -> CInt -> CInt -> IO ()
setPosition''_ Ptr ()
a1' CInt
a2' CInt
a3' CInt
a4' CInt
a5' IO () -> IO () -> IO ()
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
{-# LINE 65 "src/Graphics/UI/FLTK/LowLevel/Base/Tile.chs" #-}
instance (impl ~ (Rectangle -> IO ())) => Op (SetPosition ()) TileBase orig impl where
runOp _ _ tile rectangle = withRef tile $ \tilePtr -> do
let (x_pos,y_pos,w_pos,h_pos) = fromRectangle rectangle
setPosition' tilePtr x_pos y_pos w_pos h_pos
drawSuper' :: (Ptr ()) -> IO ((()))
drawSuper' :: Ptr () -> IO ()
drawSuper' a1 :: Ptr ()
a1 =
let {a1' :: Ptr ()
a1' = Ptr () -> Ptr ()
forall a. a -> a
id Ptr ()
a1} in
Ptr () -> IO ()
drawSuper''_ Ptr ()
a1' IO () -> (() -> IO ()) -> IO ()
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \res :: ()
res ->
let {res' :: ()
res' = () -> ()
forall a. a -> ()
supressWarningAboutRes ()
res} in
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return (()
res')
{-# LINE 71 "src/Graphics/UI/FLTK/LowLevel/Base/Tile.chs" #-}
drawTileBase :: Ref TileBase -> IO ()
drawTileBase tile = withRef tile $ \tilePtr -> drawSuper' tilePtr
handleSuper' :: (Ptr ()) -> (Int) -> IO ((Int))
handleSuper' :: Ptr () -> Int -> IO Int
handleSuper' a1 :: Ptr ()
a1 a2 :: Int
a2 =
let {a1' :: Ptr ()
a1' = Ptr () -> Ptr ()
forall a. a -> a
id Ptr ()
a1} in
let {a2' :: CInt
a2' = Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a2} in
Ptr () -> CInt -> IO CInt
handleSuper''_ Ptr ()
a1' CInt
a2' IO CInt -> (CInt -> IO Int) -> IO Int
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \res :: CInt
res ->
let {res' :: Int
res' = CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral CInt
res} in
Int -> IO Int
forall (m :: * -> *) a. Monad m => a -> m a
return (Int
res')
{-# LINE 74 "src/Graphics/UI/FLTK/LowLevel/Base/Tile.chs" #-}
handleTileBase :: Ref TileBase -> Event -> IO (Either UnknownEvent ())
handleTileBase tile event = withRef tile $ \tilePtr -> handleSuper' tilePtr (fromIntegral (fromEnum event)) >>= return . successOrUnknownEvent
resizeSuper' :: (Ptr ()) -> (Int) -> (Int) -> (Int) -> (Int) -> IO ((()))
resizeSuper' :: Ptr () -> Int -> Int -> Int -> Int -> IO ()
resizeSuper' a1 :: Ptr ()
a1 a2 :: Int
a2 a3 :: Int
a3 a4 :: Int
a4 a5 :: Int
a5 =
let {a1' :: Ptr ()
a1' = Ptr () -> Ptr ()
forall a. a -> a
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 77 "src/Graphics/UI/FLTK/LowLevel/Base/Tile.chs" #-}
resizeTileBase :: Ref TileBase -> Rectangle -> IO ()
resizeTileBase tile rectangle =
let (x_pos, y_pos, width, height) = fromRectangle rectangle
in withRef tile $ \tilePtr -> resizeSuper' tilePtr 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 82 "src/Graphics/UI/FLTK/LowLevel/Base/Tile.chs" #-}
hideTileBase :: Ref TileBase -> IO ()
hideTileBase tile = withRef tile $ \tilePtr -> hideSuper' tilePtr
showSuper' :: (Ptr ()) -> IO ((()))
showSuper' a1 =
let {a1' = id a1} in
showSuper''_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
{-# LINE 85 "src/Graphics/UI/FLTK/LowLevel/Base/Tile.chs" #-}
showWidgetTileBase :: Ref TileBase -> IO ()
showWidgetTileBase tile = withRef tile $ \tilePtr -> showSuper' tilePtr
draw'' :: (Ptr ()) -> IO ()
draw'' a1 =
let {a1' = id a1} in
draw'''_ a1' >>
return ()
{-# LINE 89 "src/Graphics/UI/FLTK/LowLevel/Base/Tile.chs" #-}
instance (impl ~ ( IO ())) => Op (Draw ()) TileBase orig impl where
runOp _ _ tile = withRef tile $ \tilePtr -> draw'' tilePtr
tileHandle' :: (Ptr ()) -> (CInt) -> IO ((Int))
tileHandle' a1 a2 =
let {a1' = id a1} in
let {a2' = id a2} in
tileHandle''_ a1' a2' >>= \res ->
let {res' = fromIntegral res} in
return (res')
{-# LINE 92 "src/Graphics/UI/FLTK/LowLevel/Base/Tile.chs" #-}
instance (impl ~ (Event -> IO (Either UnknownEvent ()))) => Op (Handle ()) TileBase orig impl where
runOp _ _ tile event = withRef tile (\p -> tileHandle' p (fromIntegral . fromEnum $ event)) >>= return . successOrUnknownEvent
show' :: (Ptr ()) -> IO ()
show' a1 =
let {a1' = id a1} in
show''_ a1' >>
return ()
{-# LINE 95 "src/Graphics/UI/FLTK/LowLevel/Base/Tile.chs" #-}
instance (impl ~ ( IO ())) => Op (ShowWidget ()) TileBase orig impl where
runOp _ _ tile = withRef tile $ \tilePtr -> show' tilePtr
hide' :: (Ptr ()) -> IO ()
hide' a1 =
let {a1' = id a1} in
hide''_ a1' >>
return ()
{-# LINE 98 "src/Graphics/UI/FLTK/LowLevel/Base/Tile.chs" #-}
instance (impl ~ ( IO ())) => Op (Hide ()) TileBase orig impl where
runOp _ _ tile = withRef tile $ \tilePtr -> hide' tilePtr
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 101 "src/Graphics/UI/FLTK/LowLevel/Base/Tile.chs" #-}
instance (impl ~ (Rectangle -> IO ())) => Op (Resize ()) TileBase orig impl where
runOp _ _ tile rectangle = withRef tile $ \tilePtr -> do
let (x_pos,y_pos,w_pos,h_pos) = fromRectangle rectangle
resize' tilePtr x_pos y_pos w_pos h_pos
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tile.chs.h Fl_OverriddenTile_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/Tile.chs.h Fl_OverriddenTile_New"
overriddenWidgetNew''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr ())))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tile.chs.h Fl_Tile_New"
tileNew''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO (C2HSImp.Ptr ()))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tile.chs.h Fl_Tile_New_WithLabel"
tileNewWithLabel''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO (C2HSImp.Ptr ())))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tile.chs.h Fl_Tile_position"
setPosition''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO ()))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tile.chs.h Fl_Tile_draw_super"
drawSuper''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tile.chs.h Fl_Tile_handle_super"
handleSuper''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tile.chs.h Fl_Tile_resize_super"
resizeSuper''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO ()))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tile.chs.h Fl_Tile_hide_super"
hideSuper''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tile.chs.h Fl_Tile_show_super"
showSuper''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tile.chs.h Fl_Tile_draw"
draw'''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tile.chs.h Fl_Tile_handle"
tileHandle''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tile.chs.h Fl_Tile_show"
show''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tile.chs.h Fl_Tile_hide"
hide''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tile.chs.h Fl_Tile_resize"
resize''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO ()))))))