-- 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/Button.chs" #-}
{-# LANGUAGE CPP, EmptyDataDecls, TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Graphics.UI.FLTK.LowLevel.Base.Button
    (
     buttonCustom,
     buttonNew,
     handleButtonBase,
     resizeButtonBase,
     hideButtonBase,
     showWidgetButtonBase,
     ButtonType(..),
     -- * Hierarchy
     --
     -- $hierarchy

     -- * Fl_Button 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.Dispatch
import qualified Data.Text as T
import Graphics.UI.FLTK.LowLevel.Hierarchy

overriddenWidgetNewWithLabel' :: (Int) -> (Int) -> (Int) -> (Int) -> (CString) -> (Ptr ()) -> IO ((Ptr ()))
overriddenWidgetNewWithLabel' a1 a2 a3 a4 a5 a6 =
  let {a1' = fromIntegral a1} in 
  let {a5' :: Ptr ()
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 37 "src/Graphics/UI/FLTK/LowLevel/Base/Button.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 38 "src/Graphics/UI/FLTK/LowLevel/Base/Button.chs" #-}

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

buttonNew :: Rectangle -> Maybe T.Text -> IO (Ref Button)
buttonNew :: Rectangle -> Maybe Text -> IO (Ref Button)
buttonNew rectangle :: Rectangle
rectangle l' :: Maybe Text
l' =
  Rectangle
-> Maybe Text
-> Maybe (Ref Button -> IO ())
-> Maybe (CustomWidgetFuncs Button)
-> (Int -> Int -> Int -> Int -> Ptr () -> IO (Ptr ()))
-> (Int -> Int -> Int -> Int -> CString -> Ptr () -> IO (Ptr ()))
-> IO (Ref Button)
forall a.
Parent a WidgetBase =>
Rectangle
-> Maybe Text
-> Maybe (Ref a -> IO ())
-> Maybe (CustomWidgetFuncs a)
-> (Int -> Int -> Int -> Int -> Ptr () -> IO (Ptr ()))
-> (Int -> Int -> Int -> Int -> CString -> Ptr () -> IO (Ptr ()))
-> IO (Ref a)
widgetMaker
    Rectangle
rectangle
    Maybe Text
l'
    Maybe (Ref Button -> IO ())
forall a. Maybe a
Nothing
    Maybe (CustomWidgetFuncs Button)
forall a. Maybe a
Nothing
    Int -> Int -> Int -> Int -> Ptr () -> IO (Ptr ())
overriddenWidgetNew'
    Int -> Int -> Int -> Int -> CString -> Ptr () -> IO (Ptr ())
overriddenWidgetNewWithLabel'

widgetDestroy' :: (Ptr ()) -> IO ((()))
widgetDestroy' :: Ptr () -> IO ()
widgetDestroy' a1 :: Ptr ()
a1 =
  let {a1' :: Ptr ()
a1' = Ptr () -> Ptr ()
forall a. a -> a
id Ptr ()
a1} in 
  Ptr () -> IO ()
widgetDestroy''_ Ptr ()
a1' IO () -> (() -> IO ()) -> IO ()
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \res :: ()
res ->
  let {res' :: ()
res' = () -> ()
forall a. a -> ()
supressWarningAboutRes ()
res} in
  () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return (()
res')

{-# LINE 63 "src/Graphics/UI/FLTK/LowLevel/Base/Button.chs" #-}

instance (impl ~ (( IO ()))) => Op (Destroy ()) ButtonBase orig impl where
  runOp _ _ button = swapRef button $
                 \buttonPtr ->
                  widgetDestroy' buttonPtr >>
                  return nullPtr
buttonHandleSuper' :: (Ptr ()) -> (CInt) -> IO ((Int))
buttonHandleSuper' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  buttonHandleSuper''_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 69 "src/Graphics/UI/FLTK/LowLevel/Base/Button.chs" #-}

handleButtonBase :: Ref ButtonBase -> Event -> IO (Either UnknownEvent ())
handleButtonBase button event = withRef button (\p -> buttonHandleSuper' p (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 72 "src/Graphics/UI/FLTK/LowLevel/Base/Button.chs" #-}

resizeButtonBase :: Ref ButtonBase -> Rectangle -> IO ()
resizeButtonBase button rectangle = withRef button $ \buttonPtr -> do
                                 let (x_pos,y_pos,w_pos,h_pos) = fromRectangle rectangle
                                 resizeSuper' buttonPtr x_pos y_pos w_pos h_pos
hideSuper' :: (Ptr ()) -> IO ((()))
hideSuper' a1 =
  let {a1' = id a1} in 
  hideSuper''_ a1' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

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

hideButtonBase :: Ref ButtonBase ->  IO ()
hideButtonBase button = withRef button $ \buttonPtr -> hideSuper' buttonPtr
buttonShowSuper' :: (Ptr ()) -> IO ((()))
buttonShowSuper' a1 =
  let {a1' = id a1} in 
  buttonShowSuper''_ a1' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

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

showWidgetButtonBase :: Ref ButtonBase -> IO ()
showWidgetButtonBase button = withRef button $ (\p -> buttonShowSuper' p)

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

{-# LINE 84 "src/Graphics/UI/FLTK/LowLevel/Base/Button.chs" #-}

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

instance (impl ~ ((Rectangle -> IO ()))) => Op (Resize ()) ButtonBase orig impl where
  runOp _ _ button rectangle = withRef button $ \buttonPtr -> do
                                 let (x_pos,y_pos,w_pos,h_pos) = fromRectangle rectangle
                                 resize' buttonPtr x_pos y_pos w_pos h_pos
buttonShow' :: (Ptr ()) -> IO ((()))
buttonShow' a1 =
  let {a1' = id a1} in 
  buttonShow''_ a1' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

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

instance (impl ~ ((IO ()))) => Op (ShowWidget ()) ButtonBase orig impl where
  runOp _ _ button = withRef button $ (\p -> buttonShow' p)
hide' :: (Ptr ()) -> IO ((()))
hide' a1 =
  let {a1' = id a1} in 
  hide''_ a1' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

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

instance (impl ~ (( IO ()))) => Op (Hide ()) ButtonBase orig impl where
  runOp _ _ button = withRef button $ \buttonPtr -> hide' buttonPtr

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

{-# LINE 99 "src/Graphics/UI/FLTK/LowLevel/Base/Button.chs" #-}

instance (impl ~ (( IO (Bool)))) => Op (GetValue ()) ButtonBase orig impl where
  runOp _ _ b = withRef b $ \bPtr -> value' bPtr
setValue' :: (Ptr ()) -> (Bool) -> IO ((Bool))
setValue' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = fromBool a2} in 
  setValue''_ a1' a2' >>= \res ->
  let {res' = toBool res} in
  return (res')

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

instance (impl ~ ((Bool ->  IO (Bool)))) => Op (SetValue ()) ButtonBase orig impl where
  runOp _ _ b v = withRef b $ \bPtr -> setValue' bPtr v
set' :: (Ptr ()) -> IO ((Bool))
set' a1 =
  let {a1' = id a1} in 
  set''_ a1' >>= \res ->
  let {res' = cToBool res} in
  return (res')

setonly' :: Ptr () -> IO ()
{-# LINE 105 "src/Graphics/UI/FLTK/LowLevel/Base/Button.chs" #-}

instance (impl ~ (( IO (Bool)))) => Op (Set ()) ButtonBase orig impl where
  runOp _ _ b = withRef b $ \bPtr -> set' bPtr
clear' :: (Ptr ()) -> IO ((Bool))
clear' a1 =
  let {a1' = id a1} in 
  clear''_ a1' >>= \res ->
  let {res' = cToBool res} in
  return (res')

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

instance (impl ~ (( IO (Bool)))) => Op (Clear ()) ButtonBase orig impl where
  runOp _ _ b = withRef b $ \bPtr -> clear' bPtr
setonly' :: (Ptr ()) -> IO ((()))
setonly' a1 =
  let {a1' = id a1} in 
  setonly''_ a1' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

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

instance (impl ~ (( IO ()))) => Op (Setonly ()) ButtonBase orig impl where
  runOp _ _ b = withRef b $ \bPtr -> setonly' bPtr
getShortcut' :: (Ptr ()) -> IO ((CInt))
getShortcut' a1 =
  let {a1' = id a1} in 
  getShortcut''_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

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

instance (impl ~ (( IO (Maybe ShortcutKeySequence)))) => Op (GetShortcut ()) ButtonBase orig impl where
  runOp _ _ b = withRef b $ \bPtr -> getShortcut' bPtr >>= return . cIntToKeySequence
setShortcut' :: (Ptr ()) -> (CInt) -> IO ((()))
setShortcut' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  setShortcut''_ a1' a2' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

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

instance (impl ~ ((ShortcutKeySequence ->  IO ()))) => Op (SetShortcut ()) ButtonBase orig impl where
  runOp _ _ input (ShortcutKeySequence modifiers char) =
    withRef input $ \inputPtr -> setShortcut' inputPtr (keySequenceToCInt modifiers char)
downBox' :: (Ptr ()) -> IO ((Boxtype))
downBox' a1 =
  let {a1' = id a1} in 
  downBox''_ a1' >>= \res ->
  let {res' = cToEnum res} in
  return (res')

{-# LINE 121 "src/Graphics/UI/FLTK/LowLevel/Base/Button.chs" #-}

instance (impl ~ (( IO (Boxtype)))) => Op (GetDownBox ()) ButtonBase orig impl where
  runOp _ _ b = withRef b $ \bPtr -> downBox' bPtr
setDownBox' :: (Ptr ()) -> (Boxtype) -> IO ((()))
setDownBox' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = cFromEnum a2} in 
  setDownBox''_ a1' a2' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

{-# LINE 124 "src/Graphics/UI/FLTK/LowLevel/Base/Button.chs" #-}

instance (impl ~ ((Boxtype ->  IO ()))) => Op (SetDownBox ()) ButtonBase orig impl where
  runOp _ _ b boxtype = withRef b $ \bPtr -> setDownBox' bPtr boxtype
downColor' :: (Ptr ()) -> IO ((Color))
downColor' a1 =
  let {a1' = id a1} in 
  downColor''_ a1' >>= \res ->
  let {res' = cToColor res} in
  return (res')

{-# LINE 127 "src/Graphics/UI/FLTK/LowLevel/Base/Button.chs" #-}

instance (impl ~ (( IO (Color)))) => Op (GetDownColor ()) ButtonBase orig impl where
  runOp _ _ b = withRef b $ \bPtr -> downColor' bPtr
setDownColor' :: (Ptr ()) -> (Color) -> IO ((()))
setDownColor' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = cFromColor a2} in 
  setDownColor''_ a1' a2' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

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

instance (impl ~ ((Color ->  IO ()))) => Op (SetDownColor ()) ButtonBase orig impl where
  runOp _ _ b c = withRef b $ \bPtr -> setDownColor' bPtr c
buttonDrawBox' :: (Ptr ()) -> IO ((()))
buttonDrawBox' a1 =
  let {a1' = id a1} in 
  buttonDrawBox''_ a1' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

{-# LINE 133 "src/Graphics/UI/FLTK/LowLevel/Base/Button.chs" #-}

buttonDrawBoxWithTC' :: (Ptr ()) -> (Boxtype) -> (Color) -> IO ((()))
buttonDrawBoxWithTC' a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = cFromEnum a2} in 
  let {a3' = cFromColor a3} in 
  buttonDrawBoxWithTC''_ a1' a2' a3' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

{-# LINE 134 "src/Graphics/UI/FLTK/LowLevel/Base/Button.chs" #-}

buttonDrawBoxWithTXywhC' :: (Ptr ()) -> (Boxtype) -> (Int) -> (Int) -> (Int) -> (Int) -> (Color) -> IO ((()))
buttonDrawBoxWithTXywhC' a1 a2 a3 a4 a5 a6 a7 =
  let {a1' = id a1} in 
  let {a2' = cFromEnum a2} in 
  let {a3' = fromIntegral a3} in 
  let {a4' = fromIntegral a4} in 
  let {a5' = fromIntegral a5} in 
  let {a6' = fromIntegral a6} in 
  let {a7' = cFromColor a7} in 
  buttonDrawBoxWithTXywhC''_ a1' a2' a3' a4' a5' a6' a7' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

{-# LINE 135 "src/Graphics/UI/FLTK/LowLevel/Base/Button.chs" #-}

instance (impl ~ ((IO ()))) => Op (DrawBox ()) ButtonBase orig impl where
  runOp _ _ button = withRef button $ \buttonPtr -> buttonDrawBox' buttonPtr
instance (impl ~ (( Boxtype -> Color -> Maybe Rectangle -> IO ()))) => Op (DrawBoxWithBoxtype ()) ButtonBase orig impl where
  runOp _ _ button bx c Nothing =
              withRef button $ \buttonPtr -> buttonDrawBoxWithTC' buttonPtr bx c
  runOp _ _ button bx c (Just r) =
              withRef button $ \buttonPtr -> do
                let (x_pos,y_pos,w_pos,h_pos) = fromRectangle r
                buttonDrawBoxWithTXywhC' buttonPtr bx x_pos y_pos w_pos h_pos c
buttonDrawBackdrop' :: (Ptr ()) -> IO ((()))
buttonDrawBackdrop' a1 =
  let {a1' = id a1} in 
  buttonDrawBackdrop''_ a1' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

{-# LINE 145 "src/Graphics/UI/FLTK/LowLevel/Base/Button.chs" #-}

instance (impl ~ (IO ())) => Op (DrawBackdrop ()) ButtonBase orig impl where
  runOp _ _ button = withRef button $ \buttonPtr -> buttonDrawBackdrop' buttonPtr
buttonDrawFocus' :: (Ptr ()) -> IO ((()))
buttonDrawFocus' a1 =
  let {a1' = id a1} in 
  buttonDrawFocus''_ a1' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

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

buttonDrawFocusWithTXywh' :: (Ptr ()) -> (Boxtype) -> (Int) -> (Int) -> (Int) -> (Int) -> IO ((()))
buttonDrawFocusWithTXywh' a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in 
  let {a2' = cFromEnum a2} in 
  let {a3' = fromIntegral a3} in 
  let {a4' = fromIntegral a4} in 
  let {a5' = fromIntegral a5} in 
  let {a6' = fromIntegral a6} in 
  buttonDrawFocusWithTXywh''_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

{-# LINE 149 "src/Graphics/UI/FLTK/LowLevel/Base/Button.chs" #-}

instance (impl ~ (Maybe (Boxtype, Rectangle) -> IO ())) => Op (DrawFocus ()) ButtonBase orig impl where
  runOp _ _ button Nothing =
                withRef button $ \ buttonPtr -> buttonDrawFocus' buttonPtr
  runOp _ _ button (Just (bx, r)) =
                withRef button $ \buttonPtr -> do
                  let (x_pos,y_pos,w_pos,h_pos) = fromRectangle r
                  buttonDrawFocusWithTXywh' buttonPtr bx x_pos y_pos w_pos h_pos

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

{-# LINE 158 "src/Graphics/UI/FLTK/LowLevel/Base/Button.chs" #-}

instance (impl ~ ( IO (ButtonType))) => Op (GetType_ ()) ButtonBase orig impl where
   runOp _ _ widget = withRef widget $ \widgetPtr -> type' widgetPtr >>= return . cToEnum
setType' :: (Ptr ()) -> (Word8) -> IO ()
setType' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = fromIntegral a2} in 
  setType''_ a1' a2' >>
  return ()

{-# LINE 161 "src/Graphics/UI/FLTK/LowLevel/Base/Button.chs" #-}

instance (impl ~ (ButtonType ->  IO ())) => Op (SetType ()) ButtonBase orig impl where
   runOp _ _ widget t = withRef widget $ \widgetPtr -> setType' widgetPtr (cFromEnum t)



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

-- $functions
-- @
-- clear :: 'Ref' 'ButtonBase' -> ( 'IO' ('Bool'))
--
-- destroy :: 'Ref' 'ButtonBase' -> ( 'IO' ())
--
-- drawBackdrop :: 'Ref' 'ButtonBase' -> 'IO' ()
--
-- drawBox :: 'Ref' 'ButtonBase' -> ('IO' ())
--
-- drawBoxWithBoxtype :: 'Ref' 'ButtonBase' -> ( 'Boxtype' -> 'Color' -> 'Maybe' 'Rectangle' -> 'IO' ())
--
-- drawFocus :: 'Ref' 'ButtonBase' -> 'Maybe' ('Boxtype', 'Rectangle') -> 'IO' ()
--
-- getDownBox :: 'Ref' 'ButtonBase' -> ( 'IO' ('Boxtype'))
--
-- getDownColor :: 'Ref' 'ButtonBase' -> ( 'IO' ('Color'))
--
-- getShortcut :: 'Ref' 'ButtonBase' -> ( 'IO' ('Maybe' 'ShortcutKeySequence'))
--
-- getType_ :: 'Ref' 'ButtonBase' -> 'IO' ('ButtonType')
--
-- getValue :: 'Ref' 'ButtonBase' -> ( 'IO' ('Bool'))
--
-- handle :: 'Ref' 'ButtonBase' -> ('Event' -> 'IO' ('Either' 'UnknownEvent' ()))
--
-- hide :: 'Ref' 'ButtonBase' -> ( 'IO' ())
--
-- resize :: 'Ref' 'ButtonBase' -> ('Rectangle' -> 'IO' ())
--
-- set :: 'Ref' 'ButtonBase' -> ( 'IO' ('Bool'))
--
-- setDownBox :: 'Ref' 'ButtonBase' -> ('Boxtype' -> 'IO' ())
--
-- setDownColor :: 'Ref' 'ButtonBase' -> ('Color' -> 'IO' ())
--
-- setShortcut :: 'Ref' 'ButtonBase' -> ('ShortcutKeySequence' -> 'IO' ())
--
-- setType :: 'Ref' 'ButtonBase' -> 'ButtonType' -> 'IO' ()
--
-- setValue :: 'Ref' 'ButtonBase' -> ('Bool' -> 'IO' ('Bool'))
--
-- setonly :: 'Ref' 'ButtonBase' -> ( 'IO' ())
--
-- showWidget :: 'Ref' 'ButtonBase' -> ('IO' ())
-- @

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Button.chs.h Fl_OverriddenButton_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/Button.chs.h Fl_OverriddenButton_New"
  overriddenWidgetNew''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr ())))))))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Button.chs.h Fl_Button_draw_box_with_tc"
  buttonDrawBoxWithTC''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (C2HSImp.CUInt -> (IO ()))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Button.chs.h Fl_Button_draw_box_with_txywhc"
  buttonDrawBoxWithTXywhC''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CUInt -> (IO ()))))))))

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

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

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

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

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