-- GENERATED by C->Haskell Compiler, version 0.28.1 Switcheroo, 1 April 2016 (Haskell)
-- Edit the ORIGNAL .chs file instead!


{-# LINE 1 "src/Graphics/UI/FLTK/LowLevel/Button.chs" #-}
{-# LANGUAGE CPP, EmptyDataDecls, TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Graphics.UI.FLTK.LowLevel.Button
    (
     buttonCustom,
     buttonNew,
     ButtonType(..),
     -- * Hierarchy
     --
     -- $hierarchy

     -- * Fl_Button functions
     --
     -- $Fl_Buttonfunctions
    )
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.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) -> (T.Text) -> (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 
  let {a5' = unsafeToCString a5} in 
  let {a6' = id a6} in 
  overriddenWidgetNewWithLabel''_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 33 "src/Graphics/UI/FLTK/LowLevel/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 34 "src/Graphics/UI/FLTK/LowLevel/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 l' =
  widgetMaker
    rectangle
    l'
    Nothing
    Nothing
    overriddenWidgetNew'
    overriddenWidgetNewWithLabel'

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

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

instance (impl ~ (( IO ()))) => Op (Destroy ()) Button orig impl where
  runOp _ _ button = swapRef button $
                 \buttonPtr ->
                  widgetDestroy' buttonPtr >>
                  return nullPtr
drawSuper' :: (Ptr ()) -> IO ((()))
drawSuper' a1 =
  let {a1' = id a1} in 
  drawSuper''_ a1' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

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

instance (impl ~ (( IO ()))) => Op (DrawSuper ()) Button orig impl where
  runOp _ _ button = withRef button $ \buttonPtr -> drawSuper' buttonPtr
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/Button.chs" #-}

instance (impl ~ ((Event ->  IO (Either UnknownEvent ())))) => Op (HandleSuper ()) Button orig impl where
  runOp _ _ button event = withRef button $ \buttonPtr -> handleSuper' buttonPtr (fromIntegral (fromEnum event)) >>= return . successOrUnknownEvent
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 71 "src/Graphics/UI/FLTK/LowLevel/Button.chs" #-}

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

instance (impl ~ ((Rectangle -> IO ()))) => Op (ResizeSuper ()) Button orig impl where
  runOp _ _ button rectangle =
    let (x_pos, y_pos, width, height) = fromRectangle rectangle
    in withRef button $ \buttonPtr -> resizeSuper' buttonPtr x_pos y_pos width height
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 79 "src/Graphics/UI/FLTK/LowLevel/Button.chs" #-}

instance (impl ~ ((Rectangle -> IO ()))) => Op (Resize ()) Button 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
hideSuper' :: (Ptr ()) -> IO ((()))
hideSuper' a1 =
  let {a1' = id a1} in 
  hideSuper''_ a1' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

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

instance (impl ~ (( IO ()))) => Op (HideSuper ()) Button orig impl where
  runOp _ _ button = withRef button $ \buttonPtr -> hideSuper' buttonPtr
hide' :: (Ptr ()) -> IO ((()))
hide' a1 =
  let {a1' = id a1} in 
  hide''_ a1' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

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

instance (impl ~ (( IO ()))) => Op (Hide ()) Button orig impl where
  runOp _ _ button = withRef button $ \buttonPtr -> hide' buttonPtr
showSuper' :: (Ptr ()) -> IO ((()))
showSuper' a1 =
  let {a1' = id a1} in 
  showSuper''_ a1' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

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

instance (impl ~ (( IO ()))) => Op (ShowWidgetSuper ()) Button orig impl where
  runOp _ _ button = withRef button $ \buttonPtr -> showSuper' buttonPtr
buttonShow' :: (Ptr ()) -> IO ((()))
buttonShow' a1 =
  let {a1' = id a1} in 
  buttonShow''_ a1' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

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

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

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

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

instance (impl ~ ((Bool ->  IO (Bool)))) => Op (SetValue ()) Button 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')

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

instance (impl ~ (( IO (Bool)))) => Op (Set ()) Button 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 105 "src/Graphics/UI/FLTK/LowLevel/Button.chs" #-}

instance (impl ~ (( IO (Bool)))) => Op (Clear ()) Button 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 108 "src/Graphics/UI/FLTK/LowLevel/Button.chs" #-}

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

instance (impl ~ (( IO (Maybe ShortcutKeySequence)))) => Op (GetShortcut ()) Button 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 114 "src/Graphics/UI/FLTK/LowLevel/Button.chs" #-}

instance (impl ~ ((ShortcutKeySequence ->  IO ()))) => Op (SetShortcut ()) Button 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 118 "src/Graphics/UI/FLTK/LowLevel/Button.chs" #-}

instance (impl ~ (( IO (Boxtype)))) => Op (GetDownBox ()) Button 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 121 "src/Graphics/UI/FLTK/LowLevel/Button.chs" #-}

instance (impl ~ ((Boxtype ->  IO ()))) => Op (SetDownBox ()) Button 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 124 "src/Graphics/UI/FLTK/LowLevel/Button.chs" #-}

instance (impl ~ (( IO (Color)))) => Op (GetDownColor ()) Button 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 127 "src/Graphics/UI/FLTK/LowLevel/Button.chs" #-}

instance (impl ~ ((Color ->  IO ()))) => Op (SetDownColor ()) Button 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 130 "src/Graphics/UI/FLTK/LowLevel/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 131 "src/Graphics/UI/FLTK/LowLevel/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 132 "src/Graphics/UI/FLTK/LowLevel/Button.chs" #-}

instance (impl ~ ((IO ()))) => Op (DrawBox ()) Button orig impl where
  runOp _ _ button = withRef button $ \buttonPtr -> buttonDrawBox' buttonPtr
instance (impl ~ (( Boxtype -> Color -> Maybe Rectangle -> IO ()))) => Op (DrawBoxWithBoxtype ()) Button 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 142 "src/Graphics/UI/FLTK/LowLevel/Button.chs" #-}

instance (impl ~ (IO ())) => Op (DrawBackdrop ()) Button 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 145 "src/Graphics/UI/FLTK/LowLevel/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 146 "src/Graphics/UI/FLTK/LowLevel/Button.chs" #-}

instance (impl ~ (Maybe (Boxtype, Rectangle) -> IO ())) => Op (DrawFocus ()) Button 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 155 "src/Graphics/UI/FLTK/LowLevel/Button.chs" #-}

instance (impl ~ ( IO (ButtonType))) => Op (GetType_ ()) Button 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 158 "src/Graphics/UI/FLTK/LowLevel/Button.chs" #-}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/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/Button.chs.h Fl_Button_type"
  type''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CUChar))

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