{-# LINE 1 "src/Graphics/UI/FLTK/LowLevel/Tile.chs" #-}
{-# LANGUAGE CPP, RankNTypes, UndecidableInstances, GADTs, TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts, ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Graphics.UI.FLTK.LowLevel.Tile
(
tileNew,
tileCustom
)
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.Hierarchy
import Graphics.UI.FLTK.LowLevel.Dispatch
import qualified Data.Text as T
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 30 "src/Graphics/UI/FLTK/LowLevel/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 31 "src/Graphics/UI/FLTK/LowLevel/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' a1 a2 a3 a4 =
let {a1' = fromIntegral a1} in
let {a2' = fromIntegral a2} in
let {a3' = fromIntegral a3} in
let {a4' = fromIntegral a4} in
tileNew''_ a1' a2' a3' a4' >>= \res ->
let {res' = id res} in
return (res')
{-# LINE 48 "src/Graphics/UI/FLTK/LowLevel/Tile.chs" #-}
tileNewWithLabel' :: (Int) -> (Int) -> (Int) -> (Int) -> (T.Text) -> 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
let {a5' = unsafeToCString a5} in
tileNewWithLabel''_ a1' a2' a3' a4' a5' >>= \res ->
let {res' = id res} in
return (res')
{-# LINE 49 "src/Graphics/UI/FLTK/LowLevel/Tile.chs" #-}
tileNew :: Rectangle -> Maybe T.Text -> IO (Ref Tile)
tileNew rectangle l'=
let (x_pos, y_pos, width, height) = fromRectangle rectangle
in case l' of
Nothing -> tileNew' x_pos y_pos width height >>=
toRef
Just l -> tileNewWithLabel' x_pos y_pos width height l >>=
toRef
setPosition' :: (Ptr ()) -> (Int) -> (Int) -> (Int) -> (Int) -> IO ()
setPosition' 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
setPosition''_ a1' a2' a3' a4' a5' >>
return ()
{-# LINE 59 "src/Graphics/UI/FLTK/LowLevel/Tile.chs" #-}
instance (impl ~ (Rectangle -> IO ())) => Op (SetPosition ()) Tile 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
draw'' :: (Ptr ()) -> IO ()
draw'' a1 =
let {a1' = id a1} in
draw'''_ a1' >>
return ()
{-# LINE 65 "src/Graphics/UI/FLTK/LowLevel/Tile.chs" #-}
instance (impl ~ ( IO ())) => Op (Draw ()) Tile orig impl where
runOp _ _ tile = withRef tile $ \tilePtr -> draw'' tilePtr
drawSuper' :: (Ptr ()) -> IO ((()))
drawSuper' a1 =
let {a1' = id a1} in
drawSuper''_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
{-# LINE 68 "src/Graphics/UI/FLTK/LowLevel/Tile.chs" #-}
instance (impl ~ ( IO ())) => Op (DrawSuper ()) Tile orig impl where
runOp _ _ tile = withRef tile $ \tilePtr -> drawSuper' 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 71 "src/Graphics/UI/FLTK/LowLevel/Tile.chs" #-}
instance (impl ~ (Event -> IO (Either UnknownEvent ()))) => Op (Handle ()) Tile orig impl where
runOp _ _ tile event = withRef tile (\p -> tileHandle' 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 74 "src/Graphics/UI/FLTK/LowLevel/Tile.chs" #-}
instance (impl ~ (Event -> IO (Either UnknownEvent ()))) => Op (HandleSuper ()) Tile orig impl where
runOp _ _ tile event = withRef tile $ \tilePtr -> handleSuper' tilePtr (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 77 "src/Graphics/UI/FLTK/LowLevel/Tile.chs" #-}
instance (impl ~ (Rectangle -> IO ())) => Op (Resize ()) Tile 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
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 82 "src/Graphics/UI/FLTK/LowLevel/Tile.chs" #-}
instance (impl ~ (Rectangle -> IO ())) => Op (ResizeSuper ()) Tile orig impl where
runOp _ _ tile rectangle =
let (x_pos, y_pos, width, height) = fromRectangle rectangle
in withRef tile $ \tilePtr -> resizeSuper' tilePtr x_pos y_pos width height
hide' :: (Ptr ()) -> IO ()
hide' a1 =
let {a1' = id a1} in
hide''_ a1' >>
return ()
{-# LINE 87 "src/Graphics/UI/FLTK/LowLevel/Tile.chs" #-}
instance (impl ~ ( IO ())) => Op (Hide ()) Tile orig impl where
runOp _ _ tile = withRef tile $ \tilePtr -> hide' tilePtr
hideSuper' :: (Ptr ()) -> IO ((()))
hideSuper' a1 =
let {a1' = id a1} in
hideSuper''_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
{-# LINE 90 "src/Graphics/UI/FLTK/LowLevel/Tile.chs" #-}
instance (impl ~ ( IO ())) => Op (HideSuper ()) Tile orig impl where
runOp _ _ tile = withRef tile $ \tilePtr -> hideSuper' tilePtr
show' :: (Ptr ()) -> IO ()
show' a1 =
let {a1' = id a1} in
show''_ a1' >>
return ()
{-# LINE 93 "src/Graphics/UI/FLTK/LowLevel/Tile.chs" #-}
instance (impl ~ ( IO ())) => Op (ShowWidget ()) Tile orig impl where
runOp _ _ tile = withRef tile $ \tilePtr -> show' tilePtr
showSuper' :: (Ptr ()) -> IO ((()))
showSuper' a1 =
let {a1' = id a1} in
showSuper''_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
{-# LINE 96 "src/Graphics/UI/FLTK/LowLevel/Tile.chs" #-}
instance (impl ~ ( IO ())) => Op (ShowWidgetSuper ()) Tile orig impl where
runOp _ _ tile = withRef tile $ \tilePtr -> showSuper' tilePtr
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/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/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/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/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/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/Tile.chs.h Fl_Tile_draw"
draw'''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Tile.chs.h Fl_Tile_draw_super"
drawSuper''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Tile.chs.h Fl_Tile_handle"
tileHandle''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Tile.chs.h Fl_Tile_handle_super"
handleSuper''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Tile.chs.h Fl_Tile_resize"
resize''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO ()))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/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/Tile.chs.h Fl_Tile_hide"
hide''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Tile.chs.h Fl_Tile_hide_super"
hideSuper''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Tile.chs.h Fl_Tile_show"
show''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Tile.chs.h Fl_Tile_show_super"
showSuper''_ :: ((C2HSImp.Ptr ()) -> (IO ()))