-- GENERATED by C->Haskell Compiler, version 0.28.6 Switcheroo, 25 November 2017 (Haskell)
-- Edit the ORIGNAL .chs file instead!


{-# LINE 1 "src/Graphics/UI/FLTK/LowLevel/OverlayWindow.chs" #-}
{-# LANGUAGE CPP, UndecidableInstances, TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts, ExistentialQuantification #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Graphics.UI.FLTK.LowLevel.OverlayWindow
  (
    -- * Hierarchy
    --
    -- $hierarchy
  )
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.Dispatch
import Graphics.UI.FLTK.LowLevel.Hierarchy

resize' :: (Ptr ()) -> (Int) -> (Int) -> (Int) -> (Int) -> IO ((()))
resize' :: Ptr () -> Int -> Int -> Int -> Int -> IO ()
resize' 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 Ptr ()
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' >>= ((Ptr () -> IO ()) -> impl) -> (Ptr () -> IO ()) -> impl
forall a b. (a -> b) -> a -> b
\res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

{-# LINE 20 "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
windowShow' :: (Ptr ()) -> IO ((()))
windowShow' a1 =
  let {a1' = id a1} in 
  windowShow''_ a1' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

{-# LINE 25 "src/Graphics/UI/FLTK/LowLevel/OverlayWindow.chs" #-}

instance (impl ~ (IO ())) => Op (ShowWidget ()) OverlayWindow 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 29 "src/Graphics/UI/FLTK/LowLevel/OverlayWindow.chs" #-}

instance (impl ~ ( IO ())) => Op (Hide ()) OverlayWindow orig impl where
  runOp _ _ window = withRef window $ \windowPtr -> hide' windowPtr

windowDestroy' :: (Ptr ()) -> IO ((()))
windowDestroy' a1 =
  let {a1' = id a1} in 
  windowDestroy''_ a1' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

{-# LINE 33 "src/Graphics/UI/FLTK/LowLevel/OverlayWindow.chs" #-}

instance (impl ~ (IO ())) => Op (Destroy ()) OverlayWindow orig impl where
  runOp _ _ win = withRef win $ \winPtr -> windowDestroy' winPtr

flush' :: (Ptr ()) -> IO ()
flush' a1 =
  let {a1' = id a1} in 
  flush''_ a1' >>
  return ()

{-# LINE 37 "src/Graphics/UI/FLTK/LowLevel/OverlayWindow.chs" #-}

instance (impl ~ ( IO ())) => Op (Flush ()) OverlayWindow orig impl where
  runOp _ _ window = withRef window $ \windowPtr -> flush' windowPtr

-- $hierarchy
-- @
-- "Graphics.UI.FLTK.LowLevel.Base.Widget"
--  |
--  v
-- "Graphics.UI.FLTK.LowLevel.Base.Group"
--  |
--  v
-- "Graphics.UI.FLTK.LowLevel.Base.Window"
--  |
--  v
-- "Graphics.UI.FLTK.LowLevel.Base.DoubleWindow"
--  |
--  v
-- "Graphics.UI.FLTK.LowLevel.Base.OverlayWindow"
--  |
--  v
-- "Graphics.UI.FLTK.LowLevel.OverlayWindow"
-- @

-- $functions
-- @
-- destroy :: 'Ref' 'OverlayWindow' -> 'IO' ()
--
-- flush :: 'Ref' 'OverlayWindow' -> 'IO' ()
--
-- hide :: 'Ref' 'OverlayWindow' -> 'IO' ()
--
-- resize :: 'Ref' 'OverlayWindow' -> 'Rectangle' -> 'IO' ()
--
-- showWidget :: 'Ref' 'OverlayWindow' -> 'IO' ()
-- @

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/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/OverlayWindow.chs.h Fl_DerivedOverlay_Window_show"
  windowShow''_ :: ((C2HSImp.Ptr ()) -> (IO ()))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/OverlayWindow.chs.h Fl_DerivedOverlay_Window_hide"
  hide''_ :: ((C2HSImp.Ptr ()) -> (IO ()))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/OverlayWindow.chs.h Fl_DerivedOverlay_Window_Destroy"
  windowDestroy''_ :: ((C2HSImp.Ptr ()) -> (IO ()))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/OverlayWindow.chs.h Fl_DerivedOverlay_Window_flush"
  flush''_ :: ((C2HSImp.Ptr ()) -> (IO ()))