{-# LINE 1 "src/Graphics/UI/FLTK/LowLevel/Base/RadioLightButton.chs" #-}
{-# LANGUAGE CPP, EmptyDataDecls, TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Graphics.UI.FLTK.LowLevel.Base.RadioLightButton
(
radioLightButtonNew
)
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_Types
import Graphics.UI.FLTK.LowLevel.Utils
import Graphics.UI.FLTK.LowLevel.Hierarchy
import Graphics.UI.FLTK.LowLevel.Base.Widget
import qualified Data.Text as T
widgetNew' :: (Int) -> (Int) -> (Int) -> (Int) -> (FunPtr DestroyCallbacksPrim) -> IO ((Ptr ()))
widgetNew' 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
widgetNew''_ a1' a2' a3' a4' a5' >>= \res ->
let {res' = id res} in
return (res')
{-# LINE 22 "src/Graphics/UI/FLTK/LowLevel/Base/RadioLightButton.chs" #-}
widgetNewWithLabel' :: (Int) -> (Int) -> (Int) -> (Int) -> (CString) -> (FunPtr DestroyCallbacksPrim) -> IO ((Ptr ()))
widgetNewWithLabel' 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
widgetNewWithLabel''_ a1' a2' a3' a4' a5' a6' >>= \res ->
let {res' = id res} in
return (res')
{-# LINE 23 "src/Graphics/UI/FLTK/LowLevel/Base/RadioLightButton.chs" #-}
radioLightButtonNew :: Rectangle -> Maybe T.Text -> IO (Ref RadioLightButton)
radioLightButtonNew rectangle l' =
let (x_pos, y_pos, width, height) = fromRectangle rectangle
in do
destroyFptr <- toDestroyCallbacksPrim defaultDestroyCallbacks
ref <- case l' of
Nothing -> widgetNew' x_pos y_pos width height destroyFptr >>= toRef
Just l -> copyTextToCString l >>= \l' -> widgetNewWithLabel' x_pos y_pos width height l' destroyFptr >>= toRef
setFlag ref WidgetFlagCopiedLabel
setFlag ref WidgetFlagCopiedTooltip
return ref
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/RadioLightButton.chs.h Fl_Radio_Light_Button_New"
widgetNew''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.FunPtr ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO ())))) -> (IO (C2HSImp.Ptr ())))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/RadioLightButton.chs.h Fl_Radio_Light_Button_New_WithLabel"
widgetNewWithLabel''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO ())))) -> (IO (C2HSImp.Ptr ()))))))))