{-# LINE 1 "src/Graphics/UI/FLTK/LowLevel/OverlayWindow.chs" #-}
{-# LANGUAGE CPP, TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts, ExistentialQuantification #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Graphics.UI.FLTK.LowLevel.OverlayWindow
(
overlayWindowNew
)
where
import qualified Foreign.C.Types as C2HSImp
import qualified Foreign.Ptr as C2HSImp
import Foreign
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 C2HS hiding (cFromEnum, toBool,cToEnum)
windowNewWithLabel' :: (Int) -> (Int) -> (String) -> (FunPtr CallbackPrim) -> IO ((Ptr ()))
windowNewWithLabel' a1 a2 a3 a4 =
let {a1' = fromIntegral a1} in
let {a2' = fromIntegral a2} in
let {a3' = unsafeToCString a3} in
let {a4' = id a4} in
windowNewWithLabel''_ a1' a2' a3' a4' >>= \res ->
let {res' = id res} in
return (res')
{-# LINE 24 "src/Graphics/UI/FLTK/LowLevel/OverlayWindow.chs" #-}
windowNew' :: (Int) -> (Int) -> (FunPtr CallbackPrim) -> IO ((Ptr ()))
windowNew' a1 a2 a3 =
let {a1' = fromIntegral a1} in
let {a2' = fromIntegral a2} in
let {a3' = id a3} in
windowNew''_ a1' a2' a3' >>= \res ->
let {res' = id res} in
return (res')
{-# LINE 25 "src/Graphics/UI/FLTK/LowLevel/OverlayWindow.chs" #-}
windowNewWithXYLabel' :: (Int) -> (Int) -> (Int) -> (Int) -> (String) -> (FunPtr CallbackPrim) -> IO ((Ptr ()))
windowNewWithXYLabel' 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
windowNewWithXYLabel''_ a1' a2' a3' a4' a5' a6' >>= \res ->
let {res' = id res} in
return (res')
{-# LINE 26 "src/Graphics/UI/FLTK/LowLevel/OverlayWindow.chs" #-}
windowNewWithXY' :: (Int) -> (Int) -> (Int) -> (Int) -> (FunPtr CallbackPrim) -> IO ((Ptr ()))
windowNewWithXY' 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
windowNewWithXY''_ a1' a2' a3' a4' a5' >>= \res ->
let {res' = id res} in
return (res')
{-# LINE 27 "src/Graphics/UI/FLTK/LowLevel/OverlayWindow.chs" #-}
overlayWindowNew :: forall a. (Parent a OverlayWindow) => Size -> Maybe String -> Maybe Position -> (Ref a -> IO ()) -> IO (Ref OverlayWindow)
overlayWindowNew (Size (Width width') (Height height')) title' position' callback' =
do
fptr <- toCallbackPrim callback'
case (title', position') of
(Just t, Just (Position (X x') (Y y'))) -> windowNewWithXYLabel' width' height' x' y' t fptr >>= toRef
(Nothing, Just (Position (X x') (Y y'))) -> windowNewWithXY' width' height' x' y' fptr >>= toRef
(Just t, Nothing) -> windowNewWithLabel' width' height' t fptr >>= toRef
(Nothing, Nothing) -> windowNew' width' height' fptr >>= toRef
windowDestroy' :: (Ptr ()) -> IO ()
windowDestroy' a1 =
let {a1' = id a1} in
windowDestroy''_ a1' >>
return ()
{-# LINE 39 "src/Graphics/UI/FLTK/LowLevel/OverlayWindow.chs" #-}
instance (impl ~ (IO ())) => Op (Destroy ()) OverlayWindow orig impl where
runOp _ _ win = withRef win $ \winPtr -> windowDestroy' winPtr
show' :: (Ptr ()) -> IO ()
show' a1 =
let {a1' = id a1} in
show''_ a1' >>
return ()
{-# LINE 42 "src/Graphics/UI/FLTK/LowLevel/OverlayWindow.chs" #-}
instance (impl ~ (IO ())) => Op (ShowWidget ()) OverlayWindow orig impl where
runOp _ _ window = withRef window (\p -> show' p)
flush' :: (Ptr ()) -> IO ()
flush' a1 =
let {a1' = id a1} in
flush''_ a1' >>
return ()
{-# LINE 45 "src/Graphics/UI/FLTK/LowLevel/OverlayWindow.chs" #-}
instance (impl ~ ( IO ())) => Op (Flush ()) OverlayWindow orig impl where
runOp _ _ 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' >>
return ()
{-# LINE 48 "src/Graphics/UI/FLTK/LowLevel/OverlayWindow.chs" #-}
instance (impl ~ (Rectangle -> IO ())) => Op (Resize ()) OverlayWindow 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
hide' :: (Ptr ()) -> IO ()
hide' a1 =
let {a1' = id a1} in
hide''_ a1' >>
return ()
{-# LINE 53 "src/Graphics/UI/FLTK/LowLevel/OverlayWindow.chs" #-}
instance (impl ~ ( IO ())) => Op (Hide ()) OverlayWindow orig impl where
runOp _ _ window = withRef window $ \windowPtr -> hide' windowPtr
canDoOverlay' :: (Ptr ()) -> IO ((Int))
canDoOverlay' a1 =
let {a1' = id a1} in
canDoOverlay''_ a1' >>= \res ->
let {res' = fromIntegral res} in
return (res')
{-# LINE 56 "src/Graphics/UI/FLTK/LowLevel/OverlayWindow.chs" #-}
instance (impl ~ ( IO (Int))) => Op (CanDoOverlay ()) OverlayWindow orig impl where
runOp _ _ win = withRef win $ \winPtr -> canDoOverlay' winPtr
redrawOverlay' :: (Ptr ()) -> IO ()
redrawOverlay' a1 =
let {a1' = id a1} in
redrawOverlay''_ a1' >>
return ()
{-# LINE 59 "src/Graphics/UI/FLTK/LowLevel/OverlayWindow.chs" #-}
instance (impl ~ ( IO ())) => Op (RedrawOverlay ()) OverlayWindow orig impl where
runOp _ _ win = withRef win $ \winPtr -> redrawOverlay' winPtr
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/OverlayWindow.chs.h Fl_Overlay_Window_New_WithLabel"
windowNewWithLabel''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr ()) -> (IO ()))) -> (IO (C2HSImp.Ptr ()))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/OverlayWindow.chs.h Fl_Overlay_Window_New"
windowNew''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.FunPtr ((C2HSImp.Ptr ()) -> (IO ()))) -> (IO (C2HSImp.Ptr ())))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/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 ()))) -> (IO (C2HSImp.Ptr ()))))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/OverlayWindow.chs.h Fl_Overlay_Window_NewXY"
windowNewWithXY''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.FunPtr ((C2HSImp.Ptr ()) -> (IO ()))) -> (IO (C2HSImp.Ptr ())))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/OverlayWindow.chs.h Fl_Overlay_Window_Destroy"
windowDestroy''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/OverlayWindow.chs.h Fl_Overlay_Window_show"
show''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/OverlayWindow.chs.h Fl_Overlay_Window_flush"
flush''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/OverlayWindow.chs.h Fl_Overlay_Window_resize"
resize''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO ()))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/OverlayWindow.chs.h Fl_Overlay_Window_hide"
hide''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/OverlayWindow.chs.h Fl_Overlay_Window_can_do_overlay"
canDoOverlay''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/OverlayWindow.chs.h Fl_Overlay_Window_redraw_overlay"
redrawOverlay''_ :: ((C2HSImp.Ptr ()) -> (IO ()))