{-# LINE 1 "src/Graphics/UI/FLTK/LowLevel/Base/OverlayWindow.chs" #-}
{-# LANGUAGE CPP, TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts, ExistentialQuantification #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Graphics.UI.FLTK.LowLevel.Base.OverlayWindow
(
overlayWindowNew
, resizeOverlayWindowBase
, hideOverlayWindowBase
, showWidgetOverlayWindowBase
, flushOverlayWindowBase
)
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.Fl_Types
import Graphics.UI.FLTK.LowLevel.Utils
import Graphics.UI.FLTK.LowLevel.Hierarchy
import Graphics.UI.FLTK.LowLevel.Dispatch
import Graphics.UI.FLTK.LowLevel.Base.Widget
import qualified Data.Text as T
windowNewWithLabel' :: (Int) -> (Int) -> (CString) -> (FunPtr CallbackPrim) -> (FunPtr DestroyCallbacksPrim) -> IO ((Ptr ()))
windowNewWithLabel' a1 a2 a3 a4 a5 =
let {a1' = fromIntegral a1} in
let {a2' = fromIntegral a2} in
(flip ($)) a3 $ \a3' ->
let {a4' = id FunPtr CallbackPrim
a4} in
let {a6' :: FunPtr DestroyCallbacksPrim
a5' = FunPtr DestroyCallbacksPrim -> FunPtr DestroyCallbacksPrim
forall a. a -> a
id FunPtr DestroyCallbacksPrim
a5} in
windowNewWithLabel''_ a1' a2' a3' a4' a5' >>= \res ->
let {res' = id res} in
return (res')
{-# LINE 29 "src/Graphics/UI/FLTK/LowLevel/Base/OverlayWindow.chs" #-}
windowNew' :: (Int) -> (Int) -> (FunPtr CallbackPrim) -> (FunPtr DestroyCallbacksPrim) -> IO ((Ptr ()))
windowNew' a1 a2 a3 a4 =
let {a1' = fromIntegral a1} in
let {a2' = fromIntegral a2} in
let {a3' = id a3} in
let {a4' = id a4} in
windowNew''_ a1' a2' a3' a4' >>= \res ->
let {res' = id res} in
return (res')
{-# LINE 30 "src/Graphics/UI/FLTK/LowLevel/Base/OverlayWindow.chs" #-}
windowNewWithXYLabel' :: (Int) -> (Int) -> (Int) -> (Int) -> (CString) -> (FunPtr CallbackPrim) -> (FunPtr DestroyCallbacksPrim) -> IO ((Ptr ()))
windowNewWithXYLabel' a1 a2 a3 a4 a5 a6 a7 =
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
let {a7' = id a7} in
windowNewWithXYLabel''_ a1' a2' a3' a4' a5' a6' a7' >>= \res ->
let {res' = id res} in
return (res')
{-# LINE 31 "src/Graphics/UI/FLTK/LowLevel/Base/OverlayWindow.chs" #-}
windowNewWithXY' :: (Int) -> (Int) -> (Int) -> (Int) -> (FunPtr CallbackPrim) -> (FunPtr DestroyCallbacksPrim) -> IO ((Ptr ()))
windowNewWithXY' 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' = id a5} in
let {a6' = id a6} in
windowNewWithXY''_ a1' a2' a3' a4' a5' a6' >>= \res ->
let {res' = id res} in
return (res')
{-# LINE 32 "src/Graphics/UI/FLTK/LowLevel/Base/OverlayWindow.chs" #-}
overlayWindowNew :: forall a. (Parent a OverlayWindowBase) => Size -> Maybe T.Text -> Maybe Position -> (Ref a -> IO ()) -> IO (Ref OverlayWindow)
overlayWindowNew (Size (Width width') (Height height')) title' position' callback' =
do
fptr <- toCallbackPrim callback'
destroyFptr <- toDestroyCallbacksPrim defaultDestroyCallbacks
ref <- case (title', position') of
(Just t, Just (Position (X x') (Y y'))) -> copyTextToCString t >>= \t' -> windowNewWithXYLabel' width' height' x' y' t' fptr destroyFptr >>= toRef
(Nothing, Just (Position (X x') (Y y'))) -> windowNewWithXY' width' height' x' y' fptr destroyFptr >>= toRef
(Just t, Nothing) -> copyTextToCString t >>= \t' -> windowNewWithLabel' width' height' t' fptr destroyFptr >>= toRef
(Nothing, Nothing) -> windowNew' width' height' fptr destroyFptr >>= toRef
setFlag ref WidgetFlagCopiedLabel
setFlag ref WidgetFlagCopiedTooltip
return ref
windowDestroy' :: (Ptr ()) -> IO ()
windowDestroy' :: CallbackPrim
windowDestroy' a1 :: Ptr ()
a1 =
let {a1' = id a1} in
CallbackPrim
windowDestroy''_ Ptr ()
a1' 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 47 "src/Graphics/UI/FLTK/LowLevel/Base/OverlayWindow.chs" #-}
instance (impl ~ (IO ())) => Op (Destroy ()) OverlayWindowBase orig impl where
runOp _ _ win = withRef win $ \winPtr -> windowDestroy' winPtr
canDoOverlay' :: (Ptr ()) -> IO ((Int))
canDoOverlay' a1 =
let {a1' = id a1} in
canDoOverlay''_ a1' >>= \res ->
let {res' = fromIntegral res} in
return (res')
{-# LINE 51 "src/Graphics/UI/FLTK/LowLevel/Base/OverlayWindow.chs" #-}
instance (impl ~ ( IO (Bool))) => Op (CanDoOverlay ()) OverlayWindowBase orig impl where
runOp _ _ win = withRef win $ \winPtr -> canDoOverlay' winPtr >>= return . cToBool
redrawOverlay' :: (Ptr ()) -> IO ()
redrawOverlay' a1 =
let {a1' = id a1} in
redrawOverlay''_ a1' >>
return ()
{-# LINE 54 "src/Graphics/UI/FLTK/LowLevel/Base/OverlayWindow.chs" #-}
instance (impl ~ ( IO ())) => Op (RedrawOverlay ()) OverlayWindowBase orig impl where
runOp _ _ win = withRef win $ \winPtr -> redrawOverlay' winPtr
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 58 "src/Graphics/UI/FLTK/LowLevel/Base/OverlayWindow.chs" #-}
resizeOverlayWindowBase :: Ref OverlayWindowBase -> Rectangle -> IO ()
resizeOverlayWindowBase 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 63 "src/Graphics/UI/FLTK/LowLevel/Base/OverlayWindow.chs" #-}
hideOverlayWindowBase :: Ref OverlayWindowBase -> IO ()
hideOverlayWindowBase 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 66 "src/Graphics/UI/FLTK/LowLevel/Base/OverlayWindow.chs" #-}
showWidgetOverlayWindowBase :: Ref OverlayWindowBase -> IO ()
showWidgetOverlayWindowBase adjuster = withRef adjuster $ \adjusterPtr -> showSuper' adjusterPtr
flushSuper' :: (Ptr ()) -> IO ()
flushSuper' a1 =
let {a1' = id a1} in
flushSuper''_ a1' >>
return ()
{-# LINE 69 "src/Graphics/UI/FLTK/LowLevel/Base/OverlayWindow.chs" #-}
flushOverlayWindowBase :: Ref OverlayWindowBase -> IO ()
flushOverlayWindowBase window = withRef window $ \windowPtr -> flush' windowPtr
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 73 "src/Graphics/UI/FLTK/LowLevel/Base/OverlayWindow.chs" #-}
instance (impl ~ (Rectangle -> IO ())) => Op (Resize ()) OverlayWindowBase 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
windowShow' :: (Ptr ()) -> IO ((()))
windowShow' a1 =
let {a1' = id a1} in
windowShow''_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
{-# LINE 78 "src/Graphics/UI/FLTK/LowLevel/Base/OverlayWindow.chs" #-}
instance (impl ~ (IO ())) => Op (ShowWidget ()) OverlayWindowBase orig impl where
runOp _ _ window = withRef window (\p -> windowShow' p)
hide' :: (Ptr ()) -> IO ((()))
hide' a1 =
let {a1' = id a1} in
hide''_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
{-# LINE 82 "src/Graphics/UI/FLTK/LowLevel/Base/OverlayWindow.chs" #-}
instance (impl ~ ( IO ())) => Op (Hide ()) OverlayWindowBase orig impl where
runOp _ _ window = withRef window $ \windowPtr -> hide' windowPtr
flush' :: (Ptr ()) -> IO ()
flush' a1 =
let {a1' = id a1} in
flush''_ a1' >>
return ()
{-# LINE 86 "src/Graphics/UI/FLTK/LowLevel/Base/OverlayWindow.chs" #-}
instance (impl ~ ( IO ())) => Op (Flush ()) OverlayWindowBase orig impl where
runOp _ _ window = withRef window $ \windowPtr -> flush' windowPtr
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/OverlayWindow.chs.h Fl_Overlay_Window_New_WithLabel"
windowNewWithLabel''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr ()) -> (IO ()))) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO ())))) -> (IO (C2HSImp.Ptr ())))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/OverlayWindow.chs.h Fl_Overlay_Window_New"
windowNew''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.FunPtr ((C2HSImp.Ptr ()) -> (IO ()))) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO ())))) -> (IO (C2HSImp.Ptr ()))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/OverlayWindow.chs.h Fl_Overlay_Window_NewXY_WithLabel"
windowNewWithXYLabel''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr ()) -> (IO ()))) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO ())))) -> (IO (C2HSImp.Ptr ())))))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/OverlayWindow.chs.h Fl_Overlay_Window_NewXY"
windowNewWithXY''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.FunPtr ((C2HSImp.Ptr ()) -> (IO ()))) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO ())))) -> (IO (C2HSImp.Ptr ()))))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/OverlayWindow.chs.h Fl_Overlay_Window_Destroy"
windowDestroy''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/OverlayWindow.chs.h Fl_Overlay_Window_can_do_overlay"
canDoOverlay''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/OverlayWindow.chs.h Fl_Overlay_Window_redraw_overlay"
redrawOverlay''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/OverlayWindow.chs.h Fl_Overlay_Window_resize"
resizeSuper''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO ()))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/OverlayWindow.chs.h Fl_Overlay_Window_hide"
hideSuper''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/OverlayWindow.chs.h Fl_Overlay_Window_show"
showSuper''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/OverlayWindow.chs.h Fl_Overlay_Window_flush"
flushSuper''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/OverlayWindow.chs.h Fl_DerivedOverlay_Window_resize"
resize''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO ()))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/OverlayWindow.chs.h Fl_DerivedOverlay_Window_show"
windowShow''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/OverlayWindow.chs.h Fl_DerivedOverlay_Window_hide"
hide''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/OverlayWindow.chs.h Fl_DerivedOverlay_Window_flush"
flush''_ :: ((C2HSImp.Ptr ()) -> (IO ()))