-- 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/TableRow.chs" #-}
{-# LANGUAGE CPP, RankNTypes, UndecidableInstances, GADTs, TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts, ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Graphics.UI.FLTK.LowLevel.TableRow
    (
     -- * Hierarchy
     --
     -- $hierarchy

     -- * Widget Functions
     --
     -- $functions
    )
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_Enumerations
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

setRows' :: Ptr () -> Int -> IO ()
setCols' a1 :: Ptr ()
:: (Ptr ()) -> (Int) -> IO ()
setCols' a1 a2 =
  let {a2' :: CInt
a1' :: Ptr ()
a1' = Ptr () -> Ptr ()
forall a. a -> a
id Ptr ()
a1} in 
  let {a2' = fromIntegral a2} in 
  setCols''_ a1' a2' >>
  return ()

{-# LINE 24 "src/Graphics/UI/FLTK/LowLevel/TableRow.chs" #-}

instance (impl ~ (Columns ->  IO ())) => Op (SetCols ()) TableRow orig impl where
  runOp _ _ table (Columns val) = withRef table $ \tablePtr -> setCols' tablePtr val
setRows' :: (Ptr ()) -> (Int) -> IO ()
setRows' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = fromIntegral a2} in 
  setRows''_ a1' a2' >>
  return ()

{-# LINE 27 "src/Graphics/UI/FLTK/LowLevel/TableRow.chs" #-}

instance (impl ~ (Rows ->  IO ())) => Op (SetRows ()) TableRow orig impl where
  runOp _ _ table (Rows val) = withRef table $ \tablePtr -> setRows' tablePtr val
draw'' :: (Ptr ()) -> IO ()
draw'' a1 =
  let {a1' = id a1} in 
  draw'''_ a1' >>
  return ()

{-# LINE 30 "src/Graphics/UI/FLTK/LowLevel/TableRow.chs" #-}

instance (impl ~ (  IO ())) => Op (Draw ()) TableRow orig impl where
  runOp _ _ tableRow = withRef tableRow $ \tableRowPtr -> draw'' tableRowPtr
hide' :: (Ptr ()) -> IO ()
hide' a1 =
  let {a1' = id a1} in 
  hide''_ a1' >>
  return ()

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

instance (impl ~ (  IO ())) => Op (Hide ()) TableRow orig impl where
  runOp _ _ tableRow = withRef tableRow $ \tableRowPtr -> hide' tableRowPtr
show' :: (Ptr ()) -> IO ()
show' a1 =
  let {a1' = id a1} in 
  show''_ a1' >>
  return ()

{-# LINE 36 "src/Graphics/UI/FLTK/LowLevel/TableRow.chs" #-}

instance (impl ~ (  IO ())) => Op (ShowWidget ()) TableRow orig impl where
  runOp _ _ tableRow = withRef tableRow $ \tableRowPtr -> show' tableRowPtr
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 39 "src/Graphics/UI/FLTK/LowLevel/TableRow.chs" #-}

instance (impl ~ (Rectangle ->  IO ())) => Op (Resize ()) TableRow orig impl where
  runOp _ _ table rectangle = let (x_pos', y_pos', width', height') = fromRectangle rectangle in withRef table $ \tablePtr -> resize' tablePtr x_pos' y_pos' width' height'
clear' :: (Ptr ()) -> IO ()
clear' a1 =
  let {a1' = id a1} in 
  clear''_ a1' >>
  return ()

{-# LINE 42 "src/Graphics/UI/FLTK/LowLevel/TableRow.chs" #-}

instance (impl ~ ( IO ())) => Op (Clear ()) TableRow orig impl where
  runOp _ _ table = withRef table $ \tablePtr -> clear' tablePtr
handle' :: (Ptr ()) -> (Event) -> IO ((Int))
handle' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = cFromEnum a2} in 
  handle''_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 45 "src/Graphics/UI/FLTK/LowLevel/TableRow.chs" #-}

instance (impl ~ (Event ->  IO(Either UnknownEvent ()))) => Op (Handle ()) TableRow orig impl where
  runOp _ _ table event = withRef table $ \tablePtr -> handle' tablePtr event >>= return  . successOrUnknownEvent

-- $hierarchy
-- @
-- "Graphics.UI.FLTK.LowLevel.Base.Widget"
--  |
--  v
-- "Graphics.UI.FLTK.LowLevel.Base.Group"
--  |
--  v
-- "Graphics.UI.FLTK.LowLevel.Base.Table"
--  |
--  v
-- "Graphics.UI.FLTK.LowLevel.Base.TableRow"
--  |
--  v
-- "Graphics.UI.FLTK.LowLevel.TableRow"
-- @

-- $functions
-- @
-- clear :: 'Ref' 'TableRow' -> 'IO' ()
--
-- draw :: 'Ref' 'TableRow' -> 'IO' ()
--
-- handle :: 'Ref' 'TableRow' -> 'Event' -> 'IO(Either' 'UnknownEvent' ())
--
-- hide :: 'Ref' 'TableRow' -> 'IO' ()
--
-- resize :: 'Ref' 'TableRow' -> 'Rectangle' -> 'IO' ()
--
-- setCols :: 'Ref' 'TableRow' -> 'Columns' -> 'IO' ()
--
-- setRows :: 'Ref' 'TableRow' -> 'Rows' -> 'IO' ()
--
-- showWidget :: 'Ref' 'TableRow' -> 'IO' ()
-- @

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

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

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

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

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

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

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/TableRow.chs.h Fl_Table_Row_clear"
  clear''_ :: ((C2HSImp.Ptr ()) -> (IO ()))

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