{-# LINE 1 "src/Graphics/UI/FLTK/LowLevel/Base/DoubleWindow.chs" #-}
{-# LANGUAGE CPP, TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Graphics.UI.FLTK.LowLevel.Base.DoubleWindow
(
doubleWindowNew,
doubleWindowCustom
, handleDoubleWindowBase
, resizeDoubleWindowBase
, hideDoubleWindowBase
, showWidgetDoubleWindowBase
, flushDoubleWindowBase
)
where
import qualified Foreign.C.Types as C2HSImp
import qualified Foreign.Ptr as C2HSImp
import Foreign
import Foreign.C
import Graphics.UI.FLTK.LowLevel.Fl_Types
import Graphics.UI.FLTK.LowLevel.Fl_Enumerations
import Graphics.UI.FLTK.LowLevel.Utils
import Graphics.UI.FLTK.LowLevel.Dispatch
import qualified Data.Text as T
import Graphics.UI.FLTK.LowLevel.Hierarchy
import Graphics.UI.FLTK.LowLevel.Base.Widget
import Graphics.UI.FLTK.LowLevel.Base.Window
overriddenWindowNew' :: (Int) -> (Int) -> (Ptr ()) -> IO ((Ptr ()))
overriddenWindowNew' a1 a2 a3 =
let {a1' = fromIntegral a1} in
let {a2' = fromIntegral a2} in
let {a3' = id a3} in
overriddenWindowNew''_ a1' a2' a3' >>= \res ->
let {res' = id res} in
return (res')
{-# LINE 34 "src/Graphics/UI/FLTK/LowLevel/Base/DoubleWindow.chs" #-}
overriddenWindowNewXY' :: (Int) -> (Int) -> (Int) -> (Int) -> (Ptr ()) -> IO ((Ptr ()))
overriddenWindowNewXY' 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
overriddenWindowNewXY''_ a1' a2' a3' a4' a5' >>= \res ->
let {res' = id res} in
return (res')
{-# LINE 35 "src/Graphics/UI/FLTK/LowLevel/Base/DoubleWindow.chs" #-}
overriddenWindowNewXYWithLabel' :: (Int) -> (Int) -> (Int) -> (Int) -> (CString) -> (Ptr ()) -> IO ((Ptr ()))
overriddenWindowNewXYWithLabel' 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
overriddenWindowNewXYWithLabel''_ a1' a2' a3' a4' a5' a6' >>= \res ->
let {res' = id res} in
return (res')
{-# LINE 36 "src/Graphics/UI/FLTK/LowLevel/Base/DoubleWindow.chs" #-}
overriddenWindowNewWithLabel' :: (Int) -> (Int) -> (CString) -> (Ptr ()) -> IO ((Ptr ()))
overriddenWindowNewWithLabel' a1 a2 a3 a4 =
let {a1' = fromIntegral a1} in
let {a2' = fromIntegral a2} in
(flip ($)) a3 $ \a3' ->
let {a4' = id a4} in
overriddenWindowNewWithLabel''_ a1' a2' a3' a4' >>= \res ->
let {res' = id res} in
return (res')
{-# LINE 37 "src/Graphics/UI/FLTK/LowLevel/Base/DoubleWindow.chs" #-}
doubleWindowCustom :: Size
-> Maybe Position
-> Maybe T.Text
-> Maybe (Ref DoubleWindow -> IO ())
-> CustomWidgetFuncs DoubleWindow
-> CustomWindowFuncs DoubleWindow
-> IO (Ref DoubleWindow)
doubleWindowCustom size position title draw' customWidgetFuncs' customWindowFuncs' =
windowMaker
size
position
title
draw'
customWidgetFuncs'
customWindowFuncs'
overriddenWindowNew'
overriddenWindowNewWithLabel'
overriddenWindowNewXY'
overriddenWindowNewXYWithLabel'
doubleWindowNew :: Size -> Maybe Position -> Maybe T.Text -> IO (Ref DoubleWindow)
doubleWindowNew :: Size -> Maybe Position -> Maybe Text -> IO (Ref DoubleWindow)
doubleWindowNew size :: Size
size position :: Maybe Position
position title :: Maybe Text
title =
Size
-> Maybe Position
-> Maybe Text
-> Maybe (Ref DoubleWindow -> IO ())
-> CustomWidgetFuncs DoubleWindow
-> CustomWindowFuncs DoubleWindow
-> (Int -> Int -> Ptr () -> IO (Ptr ()))
-> (Int -> Int -> CString -> Ptr () -> IO (Ptr ()))
-> (Int -> Int -> Int -> Int -> Ptr () -> IO (Ptr ()))
-> (Int -> Int -> Int -> Int -> CString -> Ptr () -> IO (Ptr ()))
-> IO (Ref DoubleWindow)
forall a b.
(Parent a WindowBase, Parent b WidgetBase) =>
Size
-> Maybe Position
-> Maybe Text
-> Maybe (Ref b -> IO ())
-> CustomWidgetFuncs b
-> CustomWindowFuncs a
-> (Int -> Int -> Ptr () -> IO (Ptr ()))
-> (Int -> Int -> CString -> Ptr () -> IO (Ptr ()))
-> (Int -> Int -> Int -> Int -> Ptr () -> IO (Ptr ()))
-> (Int -> Int -> Int -> Int -> CString -> Ptr () -> IO (Ptr ()))
-> IO (Ref a)
windowMaker
Size
size
Maybe Position
position
Maybe Text
title
Maybe (Ref DoubleWindow -> IO ())
forall a. Maybe a
Nothing
(CustomWidgetFuncs DoubleWindow
forall a. Parent a WidgetBase => CustomWidgetFuncs a
defaultCustomWidgetFuncs :: CustomWidgetFuncs DoubleWindow)
(CustomWindowFuncs DoubleWindow
forall a. Parent a WindowBase => CustomWindowFuncs a
defaultCustomWindowFuncs :: CustomWindowFuncs DoubleWindow)
Int -> Int -> Ptr () -> IO (Ptr ())
overriddenWindowNew'
Int -> Int -> CString -> Ptr () -> IO (Ptr ())
overriddenWindowNewWithLabel'
Int -> Int -> Int -> Int -> Ptr () -> IO (Ptr ())
overriddenWindowNewXY'
Int -> Int -> Int -> Int -> CString -> Ptr () -> IO (Ptr ())
overriddenWindowNewXYWithLabel'
windowDestroy' :: (Ptr ()) -> IO ((()))
windowDestroy' :: Ptr () -> IO ()
windowDestroy' a1 :: Ptr ()
a1 =
let {a1' = id a1} in
Ptr () -> IO ()
windowDestroy''_ 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 72 "src/Graphics/UI/FLTK/LowLevel/Base/DoubleWindow.chs" #-}
instance (impl ~ (IO ())) => Op (Destroy ()) DoubleWindowBase orig impl where
runOp _ _ win = withRef win $ \winPtr -> windowDestroy' winPtr
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 76 "src/Graphics/UI/FLTK/LowLevel/Base/DoubleWindow.chs" #-}
handleDoubleWindowBase :: Ref DoubleWindowBase -> Event -> IO (Either UnknownEvent ())
handleDoubleWindowBase adjuster event = withRef adjuster $ \adjusterPtr -> handleSuper' adjusterPtr (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 79 "src/Graphics/UI/FLTK/LowLevel/Base/DoubleWindow.chs" #-}
resizeDoubleWindowBase :: Ref DoubleWindowBase -> Rectangle -> IO ()
resizeDoubleWindowBase adjuster rectangle =
let (x_pos, y_pos, width, height) = fromRectangle rectangle
in withRef adjuster $ \adjusterPtr -> resizeSuper' adjusterPtr 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 84 "src/Graphics/UI/FLTK/LowLevel/Base/DoubleWindow.chs" #-}
hideDoubleWindowBase :: Ref DoubleWindowBase -> IO ()
hideDoubleWindowBase adjuster = withRef adjuster $ \adjusterPtr -> hideSuper' adjusterPtr
showSuper' :: (Ptr ()) -> IO ((()))
showSuper' a1 =
let {a1' = id a1} in
showSuper''_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
{-# LINE 87 "src/Graphics/UI/FLTK/LowLevel/Base/DoubleWindow.chs" #-}
showWidgetDoubleWindowBase :: Ref DoubleWindowBase -> IO ()
showWidgetDoubleWindowBase adjuster = withRef adjuster $ \adjusterPtr -> showSuper' adjusterPtr
flushSuper' :: (Ptr ()) -> IO ()
flushSuper' a1 =
let {a1' = id a1} in
flushSuper''_ a1' >>
return ()
{-# LINE 90 "src/Graphics/UI/FLTK/LowLevel/Base/DoubleWindow.chs" #-}
flushDoubleWindowBase :: Ref DoubleWindowBase -> IO ()
flushDoubleWindowBase window = withRef window $ \windowPtr -> flush' windowPtr
hide' :: (Ptr ()) -> IO ((()))
hide' a1 =
let {a1' = id a1} in
hide''_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
{-# LINE 94 "src/Graphics/UI/FLTK/LowLevel/Base/DoubleWindow.chs" #-}
instance (impl ~ ( IO ())) => Op (Hide ()) DoubleWindowBase orig impl where
runOp _ _ window = withRef window $ \windowPtr -> hide' windowPtr
windowShow' :: (Ptr ()) -> IO ((()))
windowShow' a1 =
let {a1' = id a1} in
windowShow''_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
{-# LINE 98 "src/Graphics/UI/FLTK/LowLevel/Base/DoubleWindow.chs" #-}
instance (impl ~ (IO ())) => Op (ShowWidget ()) DoubleWindowBase orig impl where
runOp _ _ window = withRef window (\p -> windowShow' p)
windowHandle' :: (Ptr ()) -> (CInt) -> IO ((Int))
windowHandle' a1 a2 =
let {a1' = id a1} in
let {a2' = id a2} in
windowHandle''_ a1' a2' >>= \res ->
let {res' = fromIntegral res} in
return (res')
{-# LINE 103 "src/Graphics/UI/FLTK/LowLevel/Base/DoubleWindow.chs" #-}
instance (impl ~ (Event -> IO (Either UnknownEvent ()))) => Op (Handle ()) DoubleWindowBase orig impl where
runOp _ _ window event = withRef window (\p -> windowHandle' 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 107 "src/Graphics/UI/FLTK/LowLevel/Base/DoubleWindow.chs" #-}
instance (impl ~ (Rectangle -> IO ())) => Op (Resize ()) DoubleWindowBase orig impl where
runOp _ _ window rectangle = withRef window $ \windowPtr -> do
let (x_pos,y_pos,w_pos,h_pos) = fromRectangle rectangle
resize' windowPtr x_pos y_pos w_pos h_pos
flush' :: (Ptr ()) -> IO ()
flush' a1 =
let {a1' = id a1} in
flush''_ a1' >>
return ()
{-# LINE 113 "src/Graphics/UI/FLTK/LowLevel/Base/DoubleWindow.chs" #-}
instance (impl ~ ( IO ())) => Op (Flush ()) DoubleWindowBase orig impl where
runOp _ _ window = withRef window $ \windowPtr -> flush' windowPtr
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/DoubleWindow.chs.h Fl_OverriddenDouble_Window_New"
overriddenWindowNew''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr ())))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/DoubleWindow.chs.h Fl_OverriddenDouble_Window_NewXY"
overriddenWindowNewXY''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr ())))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/DoubleWindow.chs.h Fl_OverriddenDouble_Window_NewXY_WithLabel"
overriddenWindowNewXYWithLabel''_ :: (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/DoubleWindow.chs.h Fl_OverriddenDouble_Window_New_WithLabel"
overriddenWindowNewWithLabel''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr ()))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/DoubleWindow.chs.h Fl_Double_Window_Destroy"
windowDestroy''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/DoubleWindow.chs.h Fl_Double_Window_handle"
handleSuper''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/DoubleWindow.chs.h Fl_Double_Window_resize"
resizeSuper''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO ()))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/DoubleWindow.chs.h Fl_Double_Window_hide"
hideSuper''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/DoubleWindow.chs.h Fl_Double_Window_show"
showSuper''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/DoubleWindow.chs.h Fl_Double_Window_flush"
flushSuper''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/DoubleWindow.chs.h Fl_DerivedDouble_Window_hide"
hide''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/DoubleWindow.chs.h Fl_DerivedDouble_Window_show"
windowShow''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/DoubleWindow.chs.h Fl_DerivedDouble_Window_handle"
windowHandle''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/DoubleWindow.chs.h Fl_DerivedDouble_Window_resize"
resize''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO ()))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/DoubleWindow.chs.h Fl_DerivedDouble_Window_flush"
flush''_ :: ((C2HSImp.Ptr ()) -> (IO ()))