-- 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/Tabs.chs" #-}
{-# LANGUAGE OverloadedStrings, CPP, TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts, UndecidableInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Graphics.UI.FLTK.LowLevel.Tabs
    (
     tabsNew,
     tabsCustom,
     TabsHeightOffset(..),
     CustomTabFuncs(..)
     -- * Hierarchy
     --
     -- $hierarchy

     -- * Functions
     --
     -- $functions
    )
where
import qualified Foreign.C.Types as C2HSImp
import qualified Foreign.Ptr as C2HSImp
import qualified Foreign.Storable as C2HSImp






import C2HS hiding (cFromEnum, cFromBool, cToBool,cToEnum)
import Graphics.UI.FLTK.LowLevel.Widget
import Graphics.UI.FLTK.LowLevel.Fl_Enumerations
import Graphics.UI.FLTK.LowLevel.Fl_Types
import Graphics.UI.FLTK.LowLevel.Utils
import Graphics.UI.FLTK.LowLevel.Dispatch
import qualified Data.Text as T
import Graphics.UI.FLTK.LowLevel.Hierarchy

data TabsHeightOffset = TabsAtTop (Maybe Int) | TabsAtBottom (Maybe Int)
tabsHeightOffsetToInt :: TabsHeightOffset -> Int
tabsHeightOffsetToInt h =
  case h of
    TabsAtTop Nothing -> 0
    TabsAtTop (Just o) -> o
    TabsAtBottom Nothing -> (-1)
    TabsAtBottom (Just o) -> (-o)

intToTabsHeightOffset :: Int -> TabsHeightOffset
intToTabsHeightOffset tabh =
  case tabh of
    _ | tabh == 0 -> TabsAtTop Nothing
      | tabh == (-1) -> TabsAtBottom Nothing
      | tabh > 0 -> TabsAtTop (Just (fromIntegral tabh))
      | otherwise -> TabsAtBottom (Just (fromIntegral tabh))

data CustomTabFuncs a =
  CustomTabFuncs
  {
    tabDrawCustom :: Ref a -> IO ()
  , tabPositionsCustom :: Ref a -> IO (Maybe AtIndex, Int, [(X,Width)])
  , tabHeightCustom :: Ref a -> IO Height
  , tabWhichCustom :: Ref a -> Position -> IO (Maybe (AtIndex, Ref Widget))
  , tabRedrawTabs :: Ref a -> IO ()
  , tabClientArea :: Ref a -> TabsHeightOffset -> IO Rectangle
  }

toTabClientAreaPrim :: (Ref a -> TabsHeightOffset -> IO Rectangle) -> IO (FunPtr TabClientAreaPrim)
toTabClientAreaPrim f =
  mkTabClientAreaPrim (\tabPtr xPtr yPtr wPtr hPtr tabh -> do
                          pp <- wrapNonNull tabPtr "Null pointer. toTabClientAreaPrim"
                          rect <- f (castTo (wrapInRef pp)) (intToTabsHeightOffset (fromIntegral tabh))
                          let (clientX, clientY, clientW, clientH) = fromRectangle rect
                          poke xPtr (fromIntegral clientX)
                          poke yPtr (fromIntegral clientY)
                          poke wPtr (fromIntegral clientW)
                          poke hPtr (fromIntegral clientH))

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

{-# LINE 70 "src/Graphics/UI/FLTK/LowLevel/Tabs.chs" #-}


toTabWhichPrim ::
  (Ref a -> Position -> IO (Maybe (AtIndex, Ref Widget))) ->
  IO (FunPtr TabWhichPrim)
toTabWhichPrim f =
  mkTabWhichPrim (\ptr event_x event_y -> do
                     pp <- wrapNonNull ptr "Null pointer. toTabWhichPrim"
                     res <- f (castTo (wrapInRef pp)) (Position (X (fromIntegral event_x)) (Y (fromIntegral event_y)))
                     maybe (return nullPtr) (\(_,ref) -> unsafeRefToPtr ref) res
                  )

customTabFunctionStruct ::
  (Parent a Tabs) =>
  (Ref a -> IO ()) ->
  (Ref a -> IO (Maybe AtIndex, Int, [(X,Width)])) ->
  (Ref a -> IO Height) ->
  (Ref a -> Position -> IO (Maybe (AtIndex, Ref Widget))) ->
  (Ref a -> IO ()) ->
  (Ref a -> TabsHeightOffset -> IO Rectangle) ->
  IO (Ptr())
customTabFunctionStruct tabDrawCustom' tabPositionsCustom' tabHeightCustom' tabWhichCustom' tabRedrawTabs' tabClientArea' =
    do
  structPtr <- virtualFuncs'
  toCallbackPrim tabDrawCustom' >>= (\ptr val -> do {C2HSImp.pokeByteOff ptr 0 (val :: (C2HSImp.FunPtr ((C2HSImp.Ptr ()) -> (IO ()))))}) structPtr
  toTabPositionsPrim tabPositionsCustom' >>= (\ptr val -> do {C2HSImp.pokeByteOff ptr 8 (val :: (C2HSImp.FunPtr ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CInt) -> ((C2HSImp.Ptr C2HSImp.CInt) -> (IO C2HSImp.CInt))))))}) structPtr
  toTabHeightPrim tabHeightCustom' >>= (\ptr val -> do {C2HSImp.pokeByteOff ptr 16 (val :: (C2HSImp.FunPtr ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))))}) structPtr
  toTabWhichPrim tabWhichCustom' >>= (\ptr val -> do {C2HSImp.pokeByteOff ptr 24 (val :: (C2HSImp.FunPtr ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO (C2HSImp.Ptr ())))))))}) structPtr
  toCallbackPrim tabRedrawTabs' >>= (\ptr val -> do {C2HSImp.pokeByteOff ptr 32 (val :: (C2HSImp.FunPtr ((C2HSImp.Ptr ()) -> (IO ()))))}) structPtr
  toTabClientAreaPrim tabClientArea' >>= (\ptr val -> do {C2HSImp.pokeByteOff ptr 40 (val :: (C2HSImp.FunPtr ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CInt) -> ((C2HSImp.Ptr C2HSImp.CInt) -> ((C2HSImp.Ptr C2HSImp.CInt) -> ((C2HSImp.Ptr C2HSImp.CInt) -> (C2HSImp.CInt -> (IO ())))))))))}) structPtr
  return structPtr

overriddenWidgetNewWithLabel' :: (Int) -> (Int) -> (Int) -> (Int) -> (CString) -> (Ptr ()) -> (Ptr ()) -> IO ((Ptr ()))
overriddenWidgetNewWithLabel' 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
  overriddenWidgetNewWithLabel''_ a1' a2' a3' a4' a5' a6' a7' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 102 "src/Graphics/UI/FLTK/LowLevel/Tabs.chs" #-}

tabsCustom ::
     Rectangle                      -- ^ The bounds of this Tabs
  -> Maybe T.Text                   -- ^ The Tabs label
  -> Maybe (CustomTabFuncs Tabs)    -- ^ Optional custom tab drawing functions
  -> Maybe (CustomWidgetFuncs Tabs) -- ^ Optional custom widget functions
  -> IO (Ref Tabs)
tabsCustom rectangle l' tabFuncs' widgetFuncs' =
  let (x_pos, y_pos, width, height) = fromRectangle rectangle
  in do
   tabFuncsPtr <- maybe virtualFuncs'
                   (\tfs -> customTabFunctionStruct
                              (tabDrawCustom tfs)
                              (tabPositionsCustom tfs)
                              (tabHeightCustom tfs)
                              (tabWhichCustom tfs)
                              (tabRedrawTabs tfs)
                              (tabClientArea tfs))
                   tabFuncs'
   widgetFuncsPtr <- customWidgetFunctionStruct (fmap tabDrawCustom tabFuncs') (maybe defaultCustomWidgetFuncs id widgetFuncs')
   label' <- maybe (return nullPtr) copyTextToCString l'
   overriddenWidgetNewWithLabel' x_pos y_pos width height label' tabFuncsPtr widgetFuncsPtr >>= toRef

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

{-# LINE 125 "src/Graphics/UI/FLTK/LowLevel/Tabs.chs" #-}

tabsNewWithLabel' :: (Int) -> (Int) -> (Int) -> (Int) -> (CString) -> IO ((Ptr ()))
tabsNewWithLabel' 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
  (flip ($)) a5 $ \a5' ->
  tabsNewWithLabel''_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 126 "src/Graphics/UI/FLTK/LowLevel/Tabs.chs" #-}

tabsNew :: Rectangle -> Maybe T.Text -> IO (Ref Tabs)
tabsNew rectangle l' =
    let (x_pos, y_pos, width, height) = fromRectangle rectangle
    in case l' of
        Nothing -> tabsNew' x_pos y_pos width height >>= toRef
        Just l -> do
           ref <- copyTextToCString l >>= \l' -> tabsNewWithLabel' x_pos y_pos width height l' >>= toRef
           setFlag ref WidgetFlagCopiedLabel
           setFlag ref WidgetFlagCopiedTooltip
           return ref


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

{-# LINE 139 "src/Graphics/UI/FLTK/LowLevel/Tabs.chs" #-}

instance (impl ~ (IO (Maybe (Ref Widget)))) => Op (GetValue ()) Tabs orig impl where
   runOp _ _ tabs = withRef tabs $ \tabsPtr -> value' tabsPtr >>= toMaybeRef

setValue' :: (Ptr ()) -> (Ptr ()) -> IO ((Int))
setValue' a1 a2 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  setValue''_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 143 "src/Graphics/UI/FLTK/LowLevel/Tabs.chs" #-}

instance (Parent a Widget, impl ~ (Maybe ( Ref a ) ->  IO (Either NoChange ()))) => Op (SetValue ()) Tabs orig impl where
   runOp _ _ tabs w = withRef tabs $ \tabsPtr -> withMaybeRef w $ \wPtr -> setValue' tabsPtr wPtr >>= return . successOrNoChange

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

{-# LINE 147 "src/Graphics/UI/FLTK/LowLevel/Tabs.chs" #-}

instance (impl ~ (IO (Maybe (Ref Widget)))) => Op (GetPush ()) Tabs orig impl where
   runOp _ _ tabs = withRef tabs $ \tabsPtr -> push' tabsPtr >>= toMaybeRef

setPush' :: (Ptr ()) -> (Ptr ()) -> IO ((Int))
setPush' a1 a2 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  setPush''_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 151 "src/Graphics/UI/FLTK/LowLevel/Tabs.chs" #-}

instance (Parent a Widget, impl ~ (Maybe ( Ref a ) ->  IO (Either NoChange ()))) => Op (SetPush ()) Tabs orig impl where
   runOp _ _ tabs w = withRef tabs $ \tabsPtr -> withMaybeRef w $ \wPtr -> setPush' tabsPtr wPtr >>= return . successOrNoChange

which' :: (Ptr ()) -> (Int) -> (Int) -> IO ((Ptr ()))
which' a1 a2 a3 =
  let {a1' = id a1} in
  let {a2' = fromIntegral a2} in
  let {a3' = fromIntegral a3} in
  which''_ a1' a2' a3' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 155 "src/Graphics/UI/FLTK/LowLevel/Tabs.chs" #-}

instance (impl ~ (Position -> IO (Maybe (Ref Widget)))) => Op (Which ()) Tabs orig impl where
   runOp _ _ tabs (Position (X event_x) (Y event_y)) = withRef tabs $ \tabsPtr -> which' tabsPtr event_x event_y >>= toMaybeRef

clientAreaWithTabh' :: (Ptr ()) -> (Int) -> IO ((Int), (Int), (Int), (Int))
clientAreaWithTabh' a1 a6 =
  let {a1' = id a1} in
  alloca $ \a2' ->
  alloca $ \a3' ->
  alloca $ \a4' ->
  alloca $ \a5' ->
  let {a6' = fromIntegral a6} in
  clientAreaWithTabh''_ a1' a2' a3' a4' a5' a6' >>
  peekIntConv  a2'>>= \a2'' ->
  peekIntConv  a3'>>= \a3'' ->
  peekIntConv  a4'>>= \a4'' ->
  peekIntConv  a5'>>= \a5'' ->
  return (a2'', a3'', a4'', a5'')

{-# LINE 159 "src/Graphics/UI/FLTK/LowLevel/Tabs.chs" #-}

instance (impl ~ (TabsHeightOffset -> IO Rectangle)) => Op (ClientArea ()) Tabs orig impl where
   runOp _ _ tabs tabh =
     withRef tabs $ \tabsPtr ->
       clientAreaWithTabh' tabsPtr (tabsHeightOffsetToInt tabh) >>= return . toRectangle

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

{-# LINE 165 "src/Graphics/UI/FLTK/LowLevel/Tabs.chs" #-}

instance (impl ~ (  IO ())) => Op (Draw ()) Tabs orig impl where
  runOp _ _ tabs = withRef tabs $ \tabsPtr -> draw'' tabsPtr
drawSuper' :: (Ptr ()) -> IO ((()))
drawSuper' a1 =
  let {a1' = id a1} in
  drawSuper''_ a1' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

{-# LINE 168 "src/Graphics/UI/FLTK/LowLevel/Tabs.chs" #-}

instance (impl ~ ( IO ())) => Op (DrawSuper ()) Tabs orig impl where
  runOp _ _ tabs = withRef tabs $ \tabsPtr -> drawSuper' tabsPtr
tabsHandle' :: (Ptr ()) -> (CInt) -> IO ((Int))
tabsHandle' a1 a2 =
  let {a1' = id a1} in
  let {a2' = id a2} in
  tabsHandle''_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 171 "src/Graphics/UI/FLTK/LowLevel/Tabs.chs" #-}

instance (impl ~ (Event -> IO (Either UnknownEvent ()))) => Op (Handle ()) Tabs orig impl where
  runOp _ _ tabs event = withRef tabs (\p -> tabsHandle' p (fromIntegral . fromEnum $ event)) >>= return  . successOrUnknownEvent
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 174 "src/Graphics/UI/FLTK/LowLevel/Tabs.chs" #-}

instance (impl ~ (Event ->  IO (Either UnknownEvent ()))) => Op (HandleSuper ()) Tabs orig impl where
  runOp _ _ tabs event = withRef tabs $ \tabsPtr -> handleSuper' tabsPtr (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 177 "src/Graphics/UI/FLTK/LowLevel/Tabs.chs" #-}

instance (impl ~ (Rectangle -> IO ())) => Op (Resize ()) Tabs orig impl where
  runOp _ _ tabs rectangle = withRef tabs $ \tabsPtr -> do
                                 let (x_pos,y_pos,w_pos,h_pos) = fromRectangle rectangle
                                 resize' tabsPtr x_pos y_pos w_pos h_pos
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 182 "src/Graphics/UI/FLTK/LowLevel/Tabs.chs" #-}

instance (impl ~ (Rectangle -> IO ())) => Op (ResizeSuper ()) Tabs orig impl where
  runOp _ _ tabs rectangle =
    let (x_pos, y_pos, width, height) = fromRectangle rectangle
    in withRef tabs $ \tabsPtr -> resizeSuper' tabsPtr x_pos y_pos width height
hide' :: (Ptr ()) -> IO ()
hide' a1 =
  let {a1' = id a1} in
  hide''_ a1' >>
  return ()

{-# LINE 187 "src/Graphics/UI/FLTK/LowLevel/Tabs.chs" #-}

instance (impl ~ (  IO ())) => Op (Hide ()) Tabs orig impl where
  runOp _ _ tabs = withRef tabs $ \tabsPtr -> hide' tabsPtr
hideSuper' :: (Ptr ()) -> IO ((()))
hideSuper' a1 =
  let {a1' = id a1} in
  hideSuper''_ a1' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

{-# LINE 190 "src/Graphics/UI/FLTK/LowLevel/Tabs.chs" #-}

instance (impl ~ ( IO ())) => Op (HideSuper ()) Tabs orig impl where
  runOp _ _ tabs = withRef tabs $ \tabsPtr -> hideSuper' tabsPtr
show' :: (Ptr ()) -> IO ()
show' a1 =
  let {a1' = id a1} in
  show''_ a1' >>
  return ()

{-# LINE 193 "src/Graphics/UI/FLTK/LowLevel/Tabs.chs" #-}

instance (impl ~ (  IO ())) => Op (ShowWidget ()) Tabs orig impl where
  runOp _ _ tabs = withRef tabs $ \tabsPtr -> show' tabsPtr
showSuper' :: (Ptr ()) -> IO ((()))
showSuper' a1 =
  let {a1' = id a1} in
  showSuper''_ a1' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

{-# LINE 196 "src/Graphics/UI/FLTK/LowLevel/Tabs.chs" #-}

instance (impl ~ ( IO ())) => Op (ShowWidgetSuper ()) Tabs orig impl where
  runOp _ _ tabs = withRef tabs $ \tabsPtr -> showSuper' tabsPtr
tabPositions' :: (Ptr ()) -> IO ((Int))
tabPositions' a1 =
  let {a1' = id a1} in
  tabPositions''_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 199 "src/Graphics/UI/FLTK/LowLevel/Tabs.chs" #-}

instance (impl ~ (IO AtIndex)) => Op (TabPositions ()) Tabs orig impl where
  runOp _ _ tabs = withRef tabs $ \tabsPtr -> tabPositions' tabsPtr >>= return . AtIndex
tabHeight' :: (Ptr ()) -> IO ((Int))
tabHeight' a1 =
  let {a1' = id a1} in
  tabHeight''_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 202 "src/Graphics/UI/FLTK/LowLevel/Tabs.chs" #-}

instance (impl ~ (IO Height)) => Op (TabHeight ()) Tabs orig impl where
  runOp _ _ tabs = withRef tabs $ \tabsPtr -> tabHeight' tabsPtr >>= return . Height
getTabAlign' :: (Ptr ()) -> IO ((AlignType))
getTabAlign' a1 =
  let {a1' = id a1} in
  getTabAlign''_ a1' >>= \res ->
  let {res' = cToEnum res} in
  return (res')

{-# LINE 205 "src/Graphics/UI/FLTK/LowLevel/Tabs.chs" #-}

instance (impl ~ (IO (AlignType))) => Op (GetTabAlign ()) Tabs orig impl where
   runOp _ _ tabs = withRef tabs $ \tabsPtr -> getTabAlign' tabsPtr
setTabAlign' :: (Ptr ()) -> (AlignType) -> IO ()
setTabAlign' a1 a2 =
  let {a1' = id a1} in
  let {a2' = cFromEnum a2} in
  setTabAlign''_ a1' a2' >>
  return ()

{-# LINE 208 "src/Graphics/UI/FLTK/LowLevel/Tabs.chs" #-}

instance (impl ~ (AlignType ->  IO ())) => Op (SetTabAlign ()) Tabs orig impl where
   runOp _ _ tabs a = withRef tabs $ \tabsPtr -> setTabAlign' tabsPtr a

-- $hierarchy
-- @
-- "Graphics.UI.FLTK.LowLevel.Widget"
--  |
--  v
-- "Graphics.UI.FLTK.LowLevel.Group"
--  |
--  v
-- "Graphics.UI.FLTK.LowLevel.Tabs"
-- @

-- $functions
-- @
-- clientArea :: 'Ref' 'Tabs' -> 'TabsHeightOffset' -> 'IO' 'Rectangle'
--
-- draw :: 'Ref' 'Tabs' -> 'IO' ()
--
-- drawSuper :: 'Ref' 'Tabs' -> 'IO' ()
--
-- getPush :: 'Ref' 'Tabs' -> 'IO' ('Maybe' ('Ref' 'Widget'))
--
-- getTabAlign :: 'Ref' 'Tabs' -> 'IO' ('AlignType')
--
-- getValue :: 'Ref' 'Tabs' -> 'IO' ('Maybe' ('Ref' 'Widget'))
--
-- handle :: 'Ref' 'Tabs' -> 'Event' -> 'IO' ('Either' 'UnknownEvent' ())
--
-- handleSuper :: 'Ref' 'Tabs' -> 'Event' -> 'IO' ('Either' 'UnknownEvent' ())
--
-- hide :: 'Ref' 'Tabs' -> 'IO' ()
--
-- hideSuper :: 'Ref' 'Tabs' -> 'IO' ()
--
-- resize :: 'Ref' 'Tabs' -> 'Rectangle' -> 'IO' ()
--
-- resizeSuper :: 'Ref' 'Tabs' -> 'Rectangle' -> 'IO' ()
--
-- setPush:: ('Parent' a 'Widget') => 'Ref' 'Tabs' -> 'Maybe' ( 'Ref' a ) -> 'IO' ('Either' 'NoChange' ())
--
-- setTabAlign :: 'Ref' 'Tabs' -> 'AlignType' -> 'IO' ()
--
-- setValue:: ('Parent' a 'Widget') => 'Ref' 'Tabs' -> 'Maybe' ( 'Ref' a ) -> 'IO' ('Either' 'NoChange' ())
--
-- showWidget :: 'Ref' 'Tabs' -> 'IO' ()
--
-- showWidgetSuper :: 'Ref' 'Tabs' -> 'IO' ()
--
-- tabHeight :: 'Ref' 'Tabs' -> 'IO' 'Height'
--
-- tabPositions :: 'Ref' 'Tabs' -> 'IO' 'AtIndex'
--
-- which :: 'Ref' 'Tabs' -> 'Position' -> 'IO' ('Maybe' ('Ref' 'Widget'))
-- @

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Tabs.chs.h Fl_Tab_default_virtual_funcs"
  virtualFuncs''_ :: (IO (C2HSImp.Ptr ()))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Tabs.chs.h Fl_OverriddenTabs_New_WithLabel"
  overriddenWidgetNewWithLabel''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr ())))))))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Tabs.chs.h Fl_Tabs_New"
  tabsNew''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO (C2HSImp.Ptr ()))))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Tabs.chs.h Fl_Tabs_New_WithLabel"
  tabsNewWithLabel''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO (C2HSImp.Ptr ())))))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Tabs.chs.h Fl_Tabs_value"
  value''_ :: ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Tabs.chs.h Fl_Tabs_set_value"
  setValue''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Tabs.chs.h Fl_Tabs_push"
  push''_ :: ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Tabs.chs.h Fl_Tabs_set_push"
  setPush''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Tabs.chs.h Fl_Tabs_which"
  which''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO (C2HSImp.Ptr ())))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Tabs.chs.h Fl_Tabs_client_area_with_tabh"
  clientAreaWithTabh''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CInt) -> ((C2HSImp.Ptr C2HSImp.CInt) -> ((C2HSImp.Ptr C2HSImp.CInt) -> ((C2HSImp.Ptr C2HSImp.CInt) -> (C2HSImp.CInt -> (IO ())))))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Tabs.chs.h Fl_Tabs_draw"
  draw'''_ :: ((C2HSImp.Ptr ()) -> (IO ()))

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

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Tabs.chs.h Fl_Tabs_handle"
  tabsHandle''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))

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

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

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

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

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

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Tabs.chs.h Fl_Tabs_show"
  show''_ :: ((C2HSImp.Ptr ()) -> (IO ()))

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

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Tabs.chs.h Fl_Tabs_tab_positions"
  tabPositions''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Tabs.chs.h Fl_Tabs_tab_height"
  tabHeight''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Tabs.chs.h Fl_Tabs_get_tab_align"
  getTabAlign''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CUInt))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Tabs.chs.h Fl_Tabs_set_tab_align"
  setTabAlign''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CUInt -> (IO ())))