-- GENERATED by C->Haskell Compiler, version 0.18.2 The shapeless maps, 31 Oct 2014 (Haskell)
-- Edit the ORIGNAL .chs file instead!


{-# LINE 1 "src/Graphics/UI/FLTK/LowLevel/DoubleWindow.chs" #-}
{-# LANGUAGE CPP, TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Graphics.UI.FLTK.LowLevel.DoubleWindow
  (
    doubleWindowNew,
    doubleWindowCustom
    -- * Hierarchy
    --
    -- $hierarchy

    -- * DoubleWindow functions
    --
    -- $DoubleWindowfunctions
  )
where


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 Graphics.UI.FLTK.LowLevel.Hierarchy
import Graphics.UI.FLTK.LowLevel.Widget
import Graphics.UI.FLTK.LowLevel.Window
import C2HS hiding (cFromEnum, toBool,cToEnum)


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 30 "src/Graphics/UI/FLTK/LowLevel/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 31 "src/Graphics/UI/FLTK/LowLevel/DoubleWindow.chs" #-}

overriddenWindowNewXYWithLabel' :: (Int) -> (Int) -> (Int) -> (Int) -> (String) -> (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 
  withCString a5 $ \a5' -> 
  let {a6' = id a6} in 
  overriddenWindowNewXYWithLabel''_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 32 "src/Graphics/UI/FLTK/LowLevel/DoubleWindow.chs" #-}

overriddenWindowNewWithLabel' :: (Int) -> (Int) -> (String) -> (Ptr ()) -> IO ((Ptr ()))
overriddenWindowNewWithLabel' a1 a2 a3 a4 =
  let {a1' = fromIntegral a1} in 
  let {a2' = fromIntegral a2} in 
  withCString a3 $ \a3' -> 
  let {a4' = id a4} in 
  overriddenWindowNewWithLabel''_ a1' a2' a3' a4' >>= \res ->
  let {res' = id res} in
  return (res')

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

doubleWindowCustom :: Size -> Maybe Position -> Maybe String -> CustomWidgetFuncs DoubleWindow -> CustomWindowFuncs DoubleWindow -> IO (Ref DoubleWindow)
doubleWindowCustom size position title customWidgetFuncs' customWindowFuncs' =
  windowMaker
    size
    position
    title
    customWidgetFuncs'
    customWindowFuncs'
    overriddenWindowNew'
    overriddenWindowNewWithLabel'
    overriddenWindowNewXY'
    overriddenWindowNewXYWithLabel'

doubleWindowNew :: Size -> Maybe Position -> Maybe String -> IO (Ref DoubleWindow)
doubleWindowNew size position title =
  windowMaker
    size
    position
    title
    (defaultCustomWidgetFuncs :: CustomWidgetFuncs DoubleWindow)
    (defaultCustomWindowFuncs :: CustomWindowFuncs DoubleWindow)
    overriddenWindowNew'
    overriddenWindowNewWithLabel'
    overriddenWindowNewXY'
    overriddenWindowNewXYWithLabel'

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

{-# LINE 60 "src/Graphics/UI/FLTK/LowLevel/DoubleWindow.chs" #-}

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

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

{-# LINE 64 "src/Graphics/UI/FLTK/LowLevel/DoubleWindow.chs" #-}

instance (impl ~ ( IO ())) => Op (DrawSuper ()) DoubleWindow orig impl where
  runOp _ _ window = withRef window $ \windowPtr -> drawSuper' windowPtr

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 68 "src/Graphics/UI/FLTK/LowLevel/DoubleWindow.chs" #-}

instance (impl ~ (Int ->  IO (Int))) => Op (HandleSuper ()) DoubleWindow orig impl where
  runOp _ _ window event = withRef window $ \windowPtr -> handleSuper' windowPtr event

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 72 "src/Graphics/UI/FLTK/LowLevel/DoubleWindow.chs" #-}

instance (impl ~ (Rectangle -> IO ())) => Op (ResizeSuper ()) DoubleWindow orig impl where
  runOp _ _ window rectangle =
    let (x_pos, y_pos, width, height) = fromRectangle rectangle
    in withRef window $ \windowPtr -> resizeSuper' windowPtr x_pos y_pos width height

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

{-# LINE 78 "src/Graphics/UI/FLTK/LowLevel/DoubleWindow.chs" #-}

instance (impl ~ ( IO ())) => Op (ShowWidgetSuper ()) DoubleWindow orig impl where
  runOp _ _ window = withRef window $ \windowPtr -> showSuper' windowPtr

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

{-# LINE 82 "src/Graphics/UI/FLTK/LowLevel/DoubleWindow.chs" #-}

instance (impl ~ ( IO ())) => Op (HideSuper ()) DoubleWindow orig impl where
  runOp _ _ window = withRef window $ \windowPtr -> hideSuper' windowPtr

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

{-# LINE 86 "src/Graphics/UI/FLTK/LowLevel/DoubleWindow.chs" #-}

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

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

{-# LINE 90 "src/Graphics/UI/FLTK/LowLevel/DoubleWindow.chs" #-}

instance (impl ~ ( IO ())) => Op (FlushSuper ()) DoubleWindow orig impl where
  runOp _ _ window = withRef window $ \windowPtr -> flushSuper' windowPtr

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

{-# LINE 94 "src/Graphics/UI/FLTK/LowLevel/DoubleWindow.chs" #-}

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

instance (impl ~ (Event -> IO Int)) => Op (Handle ()) DoubleWindow orig impl where
  runOp _ _ window event = withRef window (\p -> windowHandle' p (fromIntegral . fromEnum $ event))

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 103 "src/Graphics/UI/FLTK/LowLevel/DoubleWindow.chs" #-}

instance (impl ~ (Rectangle -> IO ())) => Op (Resize ()) DoubleWindow 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
-- $DoubleWindowfunctions
-- @
--
-- destroy :: 'Ref' 'DoubleWindow' -> 'IO' ()
--
-- drawSuper :: 'Ref' 'DoubleWindow' -> 'IO' ()
--
-- flushSuper :: 'Ref' 'DoubleWindow' -> 'IO' ()
--
-- handle :: 'Ref' 'DoubleWindow' -> 'Event' -> 'IO' 'Int'
--
-- handleSuper :: 'Ref' 'DoubleWindow' -> 'Int' -> 'IO' 'Int'
--
-- hide :: 'Ref' 'DoubleWindow' -> 'IO' ()
--
-- hideSuper :: 'Ref' 'DoubleWindow' -> 'IO' ()
--
-- resize :: 'Ref' 'DoubleWindow' -> 'Rectangle' -> 'IO' ()
--
-- resizeSuper :: 'Ref' 'DoubleWindow' -> 'Rectangle' -> 'IO' ()
--
-- showWidget :: 'Ref' 'DoubleWindow' -> 'IO' ()
--
-- showWidgetSuper :: 'Ref' 'DoubleWindow' -> 'IO' ()
-- @


-- $hierarchy
-- @
-- "Graphics.UI.FLTK.LowLevel.Widget"
--  |
--  v
-- "Graphics.UI.FLTK.LowLevel.Group"
--  |
--  v
-- "Graphics.UI.FLTK.LowLevel.Window"
--  |
--  v
-- "Graphics.UI.FLTK.LowLevel.DoubleWindow"
-- @
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/DoubleWindow.chs.h Fl_OverriddenDouble_Window_New"
  overriddenWindowNew''_ :: (CInt -> (CInt -> ((Ptr ()) -> (IO (Ptr ())))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/DoubleWindow.chs.h Fl_OverriddenDouble_Window_NewXY"
  overriddenWindowNewXY''_ :: (CInt -> (CInt -> (CInt -> (CInt -> ((Ptr ()) -> (IO (Ptr ())))))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/DoubleWindow.chs.h Fl_OverriddenDouble_Window_NewXY_WithLabel"
  overriddenWindowNewXYWithLabel''_ :: (CInt -> (CInt -> (CInt -> (CInt -> ((Ptr CChar) -> ((Ptr ()) -> (IO (Ptr ()))))))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/DoubleWindow.chs.h Fl_OverriddenDouble_Window_New_WithLabel"
  overriddenWindowNewWithLabel''_ :: (CInt -> (CInt -> ((Ptr CChar) -> ((Ptr ()) -> (IO (Ptr ()))))))

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

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/DoubleWindow.chs.h Fl_Double_Window_draw_super"
  drawSuper''_ :: ((Ptr ()) -> (IO ()))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/DoubleWindow.chs.h Fl_Double_Window_handle_super"
  handleSuper''_ :: ((Ptr ()) -> (CInt -> (IO CInt)))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/DoubleWindow.chs.h Fl_Double_Window_resize_super"
  resizeSuper''_ :: ((Ptr ()) -> (CInt -> (CInt -> (CInt -> (CInt -> (IO ()))))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/DoubleWindow.chs.h Fl_Double_Window_show_super"
  showSuper''_ :: ((Ptr ()) -> (IO ()))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/DoubleWindow.chs.h Fl_Double_Window_hide_super"
  hideSuper''_ :: ((Ptr ()) -> (IO ()))

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

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/DoubleWindow.chs.h Fl_Double_Window_flush_super"
  flushSuper''_ :: ((Ptr ()) -> (IO ()))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/DoubleWindow.chs.h Fl_Double_Window_show"
  windowShow''_ :: ((Ptr ()) -> (IO ()))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/DoubleWindow.chs.h Fl_Double_Window_handle"
  windowHandle''_ :: ((Ptr ()) -> (CInt -> (IO CInt)))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/DoubleWindow.chs.h Fl_Double_Window_resize"
  resize''_ :: ((Ptr ()) -> (CInt -> (CInt -> (CInt -> (CInt -> (IO ()))))))