-- 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/Base/Spinner.chs" #-}
{-# LANGUAGE CPP, ExistentialQuantification, TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts, ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Graphics.UI.FLTK.LowLevel.Base.Spinner
    (
     -- * Constructor
     spinnerNew,
     spinnerCustom,
     SpinnerType(..)
  , drawSpinnerBase
  , handleSpinnerBase
  , resizeSpinnerBase
  , hideSpinnerBase
  , showWidgetSpinnerBase
     -- * Hierarchy
     --
     -- $hierarchy

     -- * 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.Base.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.Hierarchy
import Graphics.UI.FLTK.LowLevel.Dispatch
import qualified Data.Text as T
data SpinnerType = FloatSpinnerType
                 | IntSpinnerType
  deriving (Int -> SpinnerType -> ShowS
[SpinnerType] -> ShowS
SpinnerType -> String
(Int -> SpinnerType -> ShowS)
-> (SpinnerType -> String)
-> ([SpinnerType] -> ShowS)
-> Show SpinnerType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SpinnerType] -> ShowS
$cshowList :: [SpinnerType] -> ShowS
show :: SpinnerType -> String
$cshow :: SpinnerType -> String
showsPrec :: Int -> SpinnerType -> ShowS
$cshowsPrec :: Int -> SpinnerType -> ShowS
Show,SpinnerType -> SpinnerType -> Bool
(SpinnerType -> SpinnerType -> Bool)
-> (SpinnerType -> SpinnerType -> Bool) -> Eq SpinnerType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SpinnerType -> SpinnerType -> Bool
$c/= :: SpinnerType -> SpinnerType -> Bool
== :: SpinnerType -> SpinnerType -> Bool
$c== :: SpinnerType -> SpinnerType -> Bool
Eq)
instance Enum SpinnerType where
  succ FloatSpinnerType = IntSpinnerType
  succ IntSpinnerType = error "SpinnerType.succ: IntSpinnerType has no successor"

  pred IntSpinnerType = FloatSpinnerType
  pred FloatSpinnerType = error "SpinnerType.pred: FloatSpinnerType has no predecessor"

  enumFromTo from to = go from
    where
      end = fromEnum to
      go v = case compare (fromEnum v) end of
                 LT -> v : go (succ v)
                 EQ -> [v]
                 GT -> []

  enumFrom :: SpinnerType -> [SpinnerType]
enumFrom from :: SpinnerType
from = SpinnerType -> SpinnerType -> [SpinnerType]
forall a. Enum a => a -> a -> [a]
enumFromTo SpinnerType
from SpinnerType
IntSpinnerType

  fromEnum FloatSpinnerType = 1
  fromEnum IntSpinnerType = 2

  toEnum 1 = FloatSpinnerType
  toEnum 2 = IntSpinnerType
  toEnum unmatched = error ("SpinnerType.toEnum: Cannot match " ++ show unmatched)

{-# LINE 41 "src/Graphics/UI/FLTK/LowLevel/Base/Spinner.chs" #-}

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

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

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

{-# LINE 43 "src/Graphics/UI/FLTK/LowLevel/Base/Spinner.chs" #-}

spinnerCustom ::
       Rectangle                         -- ^ The bounds of this Spinner
    -> Maybe T.Text                      -- ^ The Spinner label
    -> Maybe (Ref Spinner -> IO ())           -- ^ Optional custom drawing function
    -> Maybe (CustomWidgetFuncs Spinner)      -- ^ Optional custom widget functions
    -> IO (Ref Spinner)
spinnerCustom rectangle l' draw' funcs' =
  widgetMaker
    rectangle
    l'
    draw'
    funcs'
    overriddenWidgetNew'
    overriddenWidgetNewWithLabel'

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

{-# LINE 59 "src/Graphics/UI/FLTK/LowLevel/Base/Spinner.chs" #-}

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

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

spinnerNew :: Rectangle -> Maybe T.Text -> IO (Ref Spinner)
spinnerNew rectangle l'=
  widgetMaker
    rectangle
    l'
    Nothing
    Nothing
    overriddenWidgetNew'
    overriddenWidgetNewWithLabel'

setTextfont' :: (Ptr ()) -> (Font) -> IO ()
setTextfont' :: Ptr () -> Font -> IO ()
setTextfont' a1 a2 :: Font
a2 =
  let {a1' = id a1} in 
  let {a2' :: CInt
a2' = Font -> CInt
cFromFont Font
a2} in 
  Ptr () -> CInt -> IO ()
setTextfont''_ Ptr ()
a1' CInt
a2' IO () -> IO () -> IO ()
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
  () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

{-# LINE 71 "src/Graphics/UI/FLTK/LowLevel/Base/Spinner.chs" #-}

instance (impl ~ (Font ->  IO ())) => Op (SetTextfont ()) SpinnerBase orig impl where
  runOp _ _ spinner text = withRef spinner $ \spinnerPtr -> setTextfont' spinnerPtr text
textfont' :: (Ptr ()) -> IO ((Font))
textfont' a1 =
  let {a1' = id a1} in 
  textfont''_ a1' >>= \res ->
  let {res' = cToFont res} in
  return (res')

{-# LINE 74 "src/Graphics/UI/FLTK/LowLevel/Base/Spinner.chs" #-}

instance (impl ~ ( IO (Font))) => Op (GetTextfont ()) SpinnerBase orig impl where
  runOp _ _ spinner = withRef spinner $ \spinnerPtr -> textfont' spinnerPtr
setTextsize' :: (Ptr ()) -> (CInt) -> IO ()
setTextsize' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  setTextsize''_ a1' a2' >>
  return ()

{-# LINE 77 "src/Graphics/UI/FLTK/LowLevel/Base/Spinner.chs" #-}

instance (impl ~ (FontSize ->  IO ())) => Op (SetTextsize ()) SpinnerBase orig impl where
  runOp _ _ spinner (FontSize text) = withRef spinner $ \spinnerPtr -> setTextsize' spinnerPtr text
textsize' :: (Ptr ()) -> IO ((CInt))
textsize' a1 =
  let {a1' = id a1} in 
  textsize''_ a1' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 80 "src/Graphics/UI/FLTK/LowLevel/Base/Spinner.chs" #-}

instance (impl ~ ( IO (FontSize))) => Op (GetTextsize ()) SpinnerBase orig impl where
  runOp _ _ spinner = withRef spinner $ \spinnerPtr -> textsize' spinnerPtr >>= return . FontSize
setTextcolor' :: (Ptr ()) -> (Color) -> IO ()
setTextcolor' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = cFromColor a2} in 
  setTextcolor''_ a1' a2' >>
  return ()

{-# LINE 83 "src/Graphics/UI/FLTK/LowLevel/Base/Spinner.chs" #-}

instance (impl ~ (Color ->  IO ())) => Op (SetTextcolor ()) SpinnerBase orig impl where
  runOp _ _ spinner text = withRef spinner $ \spinnerPtr -> setTextcolor' spinnerPtr text
textcolor' :: (Ptr ()) -> IO ((Color))
textcolor' a1 =
  let {a1' = id a1} in 
  textcolor''_ a1' >>= \res ->
  let {res' = cToColor res} in
  return (res')

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

instance (impl ~ ( IO (Color))) => Op (GetTextcolor ()) SpinnerBase orig impl where
  runOp _ _ spinner = withRef spinner $ \spinnerPtr -> textcolor' spinnerPtr
setType' :: (Ptr ()) -> (Word8) -> IO ((()))
setType' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = fromIntegral a2} in 
  setType''_ a1' a2' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

{-# LINE 89 "src/Graphics/UI/FLTK/LowLevel/Base/Spinner.chs" #-}

instance (impl ~ (SpinnerType ->  IO ())) => Op (SetType ()) SpinnerBase orig impl where
  runOp _ _ widget t = withRef widget $ \widgetPtr -> setType' widgetPtr (fromInteger $ toInteger $ fromEnum t)
type' :: (Ptr ()) -> IO ((Word8))
type' a1 =
  let {a1' = id a1} in 
  type''_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 92 "src/Graphics/UI/FLTK/LowLevel/Base/Spinner.chs" #-}

instance (impl ~ IO (SpinnerType)) => Op (GetType_ ()) SpinnerBase orig impl where
  runOp _ _ widget = withRef widget $ \widgetPtr -> type' widgetPtr >>= return . toEnum . fromInteger . toInteger
set_format' :: (Ptr ()) -> (CString) -> IO ((()))
set_format' a1 a2 =
  let {a1' = id a1} in 
  (flip ($)) a2 $ \a2' -> 
  set_format''_ a1' a2' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

{-# LINE 95 "src/Graphics/UI/FLTK/LowLevel/Base/Spinner.chs" #-}

instance (impl ~ (T.Text ->  IO ())) => Op (SetFormat ()) SpinnerBase orig impl where
  runOp _ _ spinner f = withRef spinner $ \spinnerPtr -> copyTextToCString f >>= set_format' spinnerPtr
format' :: (Ptr ()) -> IO ((CString))
format' a1 =
  let {a1' = id a1} in 
  format''_ a1' >>= \res ->
  return res >>= \res' ->
  return (res')

{-# LINE 98 "src/Graphics/UI/FLTK/LowLevel/Base/Spinner.chs" #-}

instance (impl ~ ( IO (Maybe T.Text))) => Op (GetFormat ()) SpinnerBase orig impl where
   runOp _ _ spinner = withRef spinner $ \spinnerPtr -> format' spinnerPtr >>= \s -> cStringToText s >>= \s ->
     if (T.null s) then return Nothing else return (Just s)
value' :: (Ptr ()) -> IO ((Double))
value' a1 =
  let {a1' = id a1} in 
  value''_ a1' >>= \res ->
  let {res' = realToFrac res} in
  return (res')

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

instance (impl ~ ( IO (Double))) => Op (GetValue ()) SpinnerBase orig impl where
  runOp _ _ spinner = withRef spinner $ \spinnerPtr -> value' spinnerPtr
setValue' :: (Ptr ()) -> (Double) -> IO ((()))
setValue' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = realToFrac a2} in 
  setValue''_ a1' a2' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

{-# LINE 105 "src/Graphics/UI/FLTK/LowLevel/Base/Spinner.chs" #-}

instance (impl ~ (Double ->  IO ())) => Op (SetValue ()) SpinnerBase orig impl where
  runOp _ _ spinner v = withRef spinner $ \spinnerPtr -> setValue' spinnerPtr v
setStep' :: (Ptr ()) -> (Double) -> IO ((()))
setStep' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = realToFrac a2} in 
  setStep''_ a1' a2' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

{-# LINE 108 "src/Graphics/UI/FLTK/LowLevel/Base/Spinner.chs" #-}

instance (impl ~ (Double -> IO ())) => Op (SetStep ()) SpinnerBase orig impl where
  runOp _ _ spinner r = withRef spinner $ \spinnerPtr -> setStep' spinnerPtr r
step' :: (Ptr ()) -> IO ((Double))
step' a1 =
  let {a1' = id a1} in 
  step''_ a1' >>= \res ->
  let {res' = realToFrac res} in
  return (res')

{-# LINE 111 "src/Graphics/UI/FLTK/LowLevel/Base/Spinner.chs" #-}

instance (impl ~ ( IO (Double))) => Op (GetStep ()) SpinnerBase orig impl where
  runOp _ _ spinner = withRef spinner $ \spinnerPtr -> step' spinnerPtr
maximum' :: (Ptr ()) -> IO ((Double))
maximum' a1 =
  let {a1' = id a1} in 
  maximum''_ a1' >>= \res ->
  let {res' = realToFrac res} in
  return (res')

{-# LINE 114 "src/Graphics/UI/FLTK/LowLevel/Base/Spinner.chs" #-}

instance (impl ~ ( IO (Double))) => Op (GetMaximum ()) SpinnerBase orig impl where
  runOp _ _ valuator = withRef valuator $ \valuatorPtr -> maximum' valuatorPtr
setMaximum' :: (Ptr ()) -> (Double) -> IO ((()))
setMaximum' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = realToFrac a2} in 
  setMaximum''_ a1' a2' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

{-# LINE 117 "src/Graphics/UI/FLTK/LowLevel/Base/Spinner.chs" #-}

instance (impl ~ (Double ->  IO ())) => Op (SetMaximum ()) SpinnerBase orig impl where
  runOp _ _ valuator a = withRef valuator $ \valuatorPtr -> setMaximum' valuatorPtr a
minimum' :: (Ptr ()) -> IO ((Double))
minimum' a1 =
  let {a1' = id a1} in 
  minimum''_ a1' >>= \res ->
  let {res' = realToFrac res} in
  return (res')

{-# LINE 120 "src/Graphics/UI/FLTK/LowLevel/Base/Spinner.chs" #-}

instance (impl ~ ( IO (Double))) => Op (GetMinimum ()) SpinnerBase orig impl where
  runOp _ _ valuator = withRef valuator $ \valuatorPtr -> minimum' valuatorPtr
setMinimum' :: (Ptr ()) -> (Double) -> IO ((()))
setMinimum' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = realToFrac a2} in 
  setMinimum''_ a1' a2' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

{-# LINE 123 "src/Graphics/UI/FLTK/LowLevel/Base/Spinner.chs" #-}

instance (impl ~ (Double ->  IO ())) => Op (SetMinimum ()) SpinnerBase orig impl where
  runOp _ _ valuator a = withRef valuator $ \valuatorPtr -> setMinimum' valuatorPtr a
range' :: (Ptr ()) -> (Double) -> (Double) -> IO ((()))
range' a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = realToFrac a2} in 
  let {a3' = realToFrac a3} in 
  range''_ a1' a2' a3' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

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

instance (impl ~ (Double -> Double ->  IO ())) => Op (Range ()) SpinnerBase orig impl where
  runOp _ _ valuator a b = withRef valuator $ \valuatorPtr -> range' valuatorPtr a b

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

{-# LINE 130 "src/Graphics/UI/FLTK/LowLevel/Base/Spinner.chs" #-}

drawSpinnerBase ::  Ref SpinnerBase -> IO ()
drawSpinnerBase spinner = withRef spinner $ \spinnerPtr -> drawSuper' spinnerPtr
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 133 "src/Graphics/UI/FLTK/LowLevel/Base/Spinner.chs" #-}

handleSpinnerBase :: Ref SpinnerBase -> Event ->  IO (Either UnknownEvent ())
handleSpinnerBase spinner event = withRef spinner $ \spinnerPtr -> handleSuper' spinnerPtr (fromIntegral (fromEnum event)) >>= return . successOrUnknownEvent
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 136 "src/Graphics/UI/FLTK/LowLevel/Base/Spinner.chs" #-}

resizeSpinnerBase :: Ref SpinnerBase -> Rectangle -> IO ()
resizeSpinnerBase spinner rectangle =
    let (x_pos, y_pos, width, height) = fromRectangle rectangle
    in withRef spinner $ \spinnerPtr -> resizeSuper' spinnerPtr x_pos y_pos width height
hideSuper' :: (Ptr ()) -> IO ((()))
hideSuper' a1 =
  let {a1' = id a1} in 
  hideSuper''_ a1' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

{-# LINE 141 "src/Graphics/UI/FLTK/LowLevel/Base/Spinner.chs" #-}

hideSpinnerBase ::  Ref SpinnerBase -> IO ()
hideSpinnerBase spinner = withRef spinner $ \spinnerPtr -> hideSuper' spinnerPtr
showSuper' :: (Ptr ()) -> IO ((()))
showSuper' a1 =
  let {a1' = id a1} in 
  showSuper''_ a1' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

{-# LINE 144 "src/Graphics/UI/FLTK/LowLevel/Base/Spinner.chs" #-}

showWidgetSpinnerBase ::  Ref SpinnerBase -> IO ()
showWidgetSpinnerBase spinner = withRef spinner $ \spinnerPtr -> showSuper' spinnerPtr

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

{-# LINE 148 "src/Graphics/UI/FLTK/LowLevel/Base/Spinner.chs" #-}

instance (impl ~ (  IO ())) => Op (Draw ()) SpinnerBase orig impl where
  runOp _ _ spinner = withRef spinner $ \spinnerPtr -> draw'' spinnerPtr
spinnerHandle' :: (Ptr ()) -> (CInt) -> IO ((Int))
spinnerHandle' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  spinnerHandle''_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

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

instance (impl ~ (Event -> IO (Either UnknownEvent ()))) => Op (Handle ()) SpinnerBase orig impl where
  runOp _ _ spinner event = withRef spinner (\p -> spinnerHandle' p (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 154 "src/Graphics/UI/FLTK/LowLevel/Base/Spinner.chs" #-}

instance (impl ~ (Rectangle -> IO ())) => Op (Resize ()) SpinnerBase orig impl where
  runOp _ _ spinner rectangle = withRef spinner $ \spinnerPtr -> do
                                 let (x_pos,y_pos,w_pos,h_pos) = fromRectangle rectangle
                                 resize' spinnerPtr x_pos y_pos w_pos h_pos
hide' :: (Ptr ()) -> IO ()
hide' a1 =
  let {a1' = id a1} in 
  hide''_ a1' >>
  return ()

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

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

{-# LINE 162 "src/Graphics/UI/FLTK/LowLevel/Base/Spinner.chs" #-}

instance (impl ~ (  IO ())) => Op (ShowWidget ()) SpinnerBase orig impl where
  runOp _ _ spinner = withRef spinner $ \spinnerPtr -> show' spinnerPtr

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

{-# LINE 166 "src/Graphics/UI/FLTK/LowLevel/Base/Spinner.chs" #-}

instance (impl ~ (Bool -> IO ())) => Op (SetWrap ()) SpinnerBase orig impl where
  runOp _ _ spinner r = withRef spinner $ \spinnerPtr -> setWrap' spinnerPtr r
wrap' :: (Ptr ()) -> IO ((Bool))
wrap' a1 =
  let {a1' = id a1} in 
  wrap''_ a1' >>= \res ->
  let {res' = cToBool res} in
  return (res')

{-# LINE 169 "src/Graphics/UI/FLTK/LowLevel/Base/Spinner.chs" #-}

instance (impl ~ ( IO (Bool))) => Op (GetWrap ()) SpinnerBase orig impl where
  runOp _ _ spinner = withRef spinner $ \spinnerPtr -> wrap' spinnerPtr


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

-- $functions
-- @
-- draw :: 'Ref' 'SpinnerBase' -> 'IO' ()
--
-- getFormat :: 'Ref' 'SpinnerBase' -> 'IO' ('Maybe' 'T.Text')
--
-- getMaximum :: 'Ref' 'SpinnerBase' -> 'IO' ('Double')
--
-- getMinimum :: 'Ref' 'SpinnerBase' -> 'IO' ('Double')
--
-- getStep :: 'Ref' 'SpinnerBase' -> 'IO' ('Double')
--
-- getTextcolor :: 'Ref' 'SpinnerBase' -> 'IO' ('Color')
--
-- getTextfont :: 'Ref' 'SpinnerBase' -> 'IO' ('Font')
--
-- getTextsize :: 'Ref' 'SpinnerBase' -> 'IO' ('FontSize')
--
-- getType_ :: 'Ref' 'SpinnerBase' -> 'IO' ('SpinnerType')
--
-- getValue :: 'Ref' 'SpinnerBase' -> 'IO' ('Double')
--
-- getWrap :: 'Ref' 'SpinnerBase' -> 'IO' ('Bool')
--
-- handle :: 'Ref' 'SpinnerBase' -> 'Event' -> 'IO' ('Either' 'UnknownEvent' ())
--
-- hide :: 'Ref' 'SpinnerBase' -> 'IO' ()
--
-- range :: 'Ref' 'SpinnerBase' -> 'Double' -> 'Double' -> 'IO' ()
--
-- resize :: 'Ref' 'SpinnerBase' -> 'Rectangle' -> 'IO' ()
--
-- setFormat :: 'Ref' 'SpinnerBase' -> 'T.Text' -> 'IO' ()
--
-- setMaximum :: 'Ref' 'SpinnerBase' -> 'Double' -> 'IO' ()
--
-- setMinimum :: 'Ref' 'SpinnerBase' -> 'Double' -> 'IO' ()
--
-- setStep :: 'Ref' 'SpinnerBase' -> 'Double' -> 'IO' ()
--
-- setTextcolor :: 'Ref' 'SpinnerBase' -> 'Color' -> 'IO' ()
--
-- setTextfont :: 'Ref' 'SpinnerBase' -> 'Font' -> 'IO' ()
--
-- setTextsize :: 'Ref' 'SpinnerBase' -> 'FontSize' -> 'IO' ()
--
-- setType :: 'Ref' 'SpinnerBase' -> 'SpinnerType' -> 'IO' ()
--
-- setValue :: 'Ref' 'SpinnerBase' -> 'Double' -> 'IO' ()
--
-- setWrap :: 'Ref' 'SpinnerBase' -> 'Bool' -> 'IO' ()
--
-- showWidget :: 'Ref' 'SpinnerBase' -> 'IO' ()
-- @

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

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Spinner.chs.h Fl_OverriddenSpinner_New"
  overriddenWidgetNew''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr ())))))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Spinner.chs.h Fl_Spinner_New"
  spinnerNew''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO (C2HSImp.Ptr ()))))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Spinner.chs.h Fl_Spinner_New_WithLabel"
  spinnerNewWithLabel''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO (C2HSImp.Ptr ())))))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Spinner.chs.h Fl_Spinner_set_textfont"
  setTextfont''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Spinner.chs.h Fl_Spinner_textfont"
  textfont''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Spinner.chs.h Fl_Spinner_set_textsize"
  setTextsize''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Spinner.chs.h Fl_Spinner_textsize"
  textsize''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Spinner.chs.h Fl_Spinner_set_textcolor"
  setTextcolor''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CUInt -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Spinner.chs.h Fl_Spinner_textcolor"
  textcolor''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CUInt))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Spinner.chs.h Fl_Spinner_set_type"
  setType''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CUChar -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Spinner.chs.h Fl_Spinner_type"
  type''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CUChar))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Spinner.chs.h Fl_Spinner_set_format"
  set_format''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Spinner.chs.h Fl_Spinner_format"
  format''_ :: ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr C2HSImp.CChar)))

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

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Spinner.chs.h Fl_Spinner_set_value"
  setValue''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CDouble -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Spinner.chs.h Fl_Spinner_set_step"
  setStep''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CDouble -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Spinner.chs.h Fl_Spinner_step"
  step''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CDouble))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Spinner.chs.h Fl_Spinner_maximum"
  maximum''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CDouble))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Spinner.chs.h Fl_Spinner_set_maximum"
  setMaximum''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CDouble -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Spinner.chs.h Fl_Spinner_minimum"
  minimum''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CDouble))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Spinner.chs.h Fl_Spinner_set_minimum"
  setMinimum''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CDouble -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Spinner.chs.h Fl_Spinner_range"
  range''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (IO ()))))

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

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

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

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

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

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

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Spinner.chs.h Fl_Spinner_handle"
  spinnerHandle''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))

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

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

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

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Spinner.chs.h Fl_Spinner_set_wrap"
  setWrap''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Spinner.chs.h Fl_Spinner_wrap"
  wrap''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))