{-# LINE 1 "src/Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs" #-}
{-# LANGUAGE CPP, ExistentialQuantification, TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts, ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Graphics.UI.FLTK.LowLevel.Base.ValueOutput
(
valueOutputNew,
valueOutputCustom
, drawValueOutputBase
, handleValueOutputBase
, resizeValueOutputBase
, hideValueOutputBase
, showWidgetValueOutputBase
)
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
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 33 "src/Graphics/UI/FLTK/LowLevel/Base/ValueOutput.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/Base/ValueOutput.chs" #-}
valueOutputCustom ::
Rectangle
-> Maybe T.Text
-> Maybe (Ref ValueOutput -> IO ())
-> Maybe (CustomWidgetFuncs ValueOutput)
-> IO (Ref ValueOutput)
valueOutputCustom rectangle l' draw' funcs' =
widgetMaker
rectangle
l'
draw'
funcs'
overriddenWidgetNew'
overriddenWidgetNewWithLabel'
valueOutputNew' :: (Int) -> (Int) -> (Int) -> (Int) -> IO ((Ptr ()))
valueOutputNew' a1 a2 a3 a4 =
let {a1' = fromIntegral a1} in
let {a2' = fromIntegral a2} in
let {a3' = fromIntegral a3} in
let {a4' = fromIntegral a4} in
valueOutputNew''_ a1' a2' a3' a4' >>= \res ->
let {res' = id res} in
return (res')
{-# LINE 51 "src/Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs" #-}
valueOutputNewWithLabel' :: (Int) -> (Int) -> (Int) -> (Int) -> (CString) -> IO ((Ptr ()))
valueOutputNewWithLabel' 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' ->
valueOutputNewWithLabel''_ a1' a2' a3' a4' a5' >>= \res ->
let {res' = id res} in
return (res')
{-# LINE 52 "src/Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs" #-}
valueOutputNew :: Rectangle -> Maybe T.Text -> IO (Ref ValueOutput)
valueOutputNew rectangle l'=
widgetMaker
rectangle
l'
Nothing
Nothing
overriddenWidgetNew'
overriddenWidgetNewWithLabel'
valueOutputDestroy' :: (Ptr ()) -> IO ((()))
valueOutputDestroy' a1 =
let {a1' = id a1} in
valueOutputDestroy''_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
{-# LINE 63 "src/Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs" #-}
instance (impl ~ IO ()) => Op (Destroy ()) ValueOutputBase orig impl where
runOp _ _ win = swapRef win $ \winPtr -> do
valueOutputDestroy' winPtr
return nullPtr
soft' :: (Ptr ()) -> IO ((Bool))
soft' a1 =
let {a1' = id a1} in
soft''_ a1' >>= \res ->
let {res' = cToBool res} in
return (res')
{-# LINE 69 "src/Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs" #-}
instance (impl ~ ( IO (Bool))) => Op (GetSoft ()) ValueOutputBase orig impl where
runOp _ _ value_input = withRef value_input $ \value_inputPtr -> soft' value_inputPtr
setSoft' :: (Ptr ()) -> (Bool) -> IO ()
setSoft' a1 a2 =
let {a1' = id a1} in
let {a2' = cFromBool a2} in
setSoft''_ a1' a2' >>
return ()
{-# LINE 72 "src/Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs" #-}
instance (impl ~ (Bool-> IO ())) => Op (SetSoft ()) ValueOutputBase orig impl where
runOp _ _ value_input s = withRef value_input $ \value_inputPtr -> setSoft' value_inputPtr s
textfont' :: (Ptr ()) -> IO ((Font))
textfont' a1 =
let {a1' = id a1} in
textfont''_ a1' >>= \res ->
let {res' = cToFont res} in
return (res')
{-# LINE 75 "src/Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs" #-}
instance (impl ~ ( IO (Font))) => Op (GetTextfont ()) ValueOutputBase orig impl where
runOp _ _ value_input = withRef value_input $ \value_inputPtr -> textfont' value_inputPtr
setTextfont' :: (Ptr ()) -> (Int) -> IO ()
setTextfont' a1 a2 =
let {a1' = id a1} in
let {a2' = fromIntegral a2} in
setTextfont''_ a1' a2' >>
return ()
{-# LINE 78 "src/Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs" #-}
instance (impl ~ (Font -> IO ())) => Op (SetTextfont ()) ValueOutputBase orig impl where
runOp _ _ value_input (Font v) = withRef value_input $ \value_inputPtr -> setTextfont' value_inputPtr v
textsize' :: (Ptr ()) -> IO ((CInt))
textsize' a1 =
let {a1' = id a1} in
textsize''_ a1' >>= \res ->
let {res' = id res} in
return (res')
{-# LINE 81 "src/Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs" #-}
instance (impl ~ ( IO (FontSize))) => Op (GetTextsize ()) ValueOutputBase orig impl where
runOp _ _ value_input = withRef value_input $ \value_inputPtr -> textsize' value_inputPtr >>= return . FontSize
setTextsize' :: (Ptr ()) -> (CInt) -> IO ()
setTextsize' a1 a2 =
let {a1' = id a1} in
let {a2' = id a2} in
setTextsize''_ a1' a2' >>
return ()
{-# LINE 84 "src/Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs" #-}
instance (impl ~ (FontSize -> IO ())) => Op (SetTextsize ()) ValueOutputBase orig impl where
runOp _ _ value_input (FontSize v) = withRef value_input $ \value_inputPtr -> setTextsize' value_inputPtr v
textcolor' :: (Ptr ()) -> IO ((Color))
textcolor' a1 =
let {a1' = id a1} in
textcolor''_ a1' >>= \res ->
let {res' = cToColor res} in
return (res')
{-# LINE 87 "src/Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs" #-}
instance (impl ~ ( IO (Color))) => Op (GetTextcolor ()) ValueOutputBase orig impl where
runOp _ _ value_input = withRef value_input $ \value_inputPtr -> textcolor' value_inputPtr
setTextcolor' :: (Ptr ()) -> (CInt) -> IO ()
setTextcolor' a1 a2 =
let {a1' = id a1} in
let {a2' = id a2} in
setTextcolor''_ a1' a2' >>
return ()
{-# LINE 90 "src/Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs" #-}
instance (impl ~ (Color -> IO ())) => Op (SetTextcolor ()) ValueOutputBase orig impl where
runOp _ _ value_input (Color v) = withRef value_input $ \value_inputPtr -> setTextcolor' value_inputPtr (fromIntegral v)
drawSuper' :: (Ptr ()) -> IO ((()))
drawSuper' a1 =
let {a1' = id a1} in
drawSuper''_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
{-# LINE 94 "src/Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs" #-}
drawValueOutputBase :: Ref ValueOutputBase -> IO ()
drawValueOutputBase valueOutput = withRef valueOutput $ \valueOutputPtr -> drawSuper' valueOutputPtr
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 97 "src/Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs" #-}
handleValueOutputBase :: Ref ValueOutputBase -> Event -> IO (Either UnknownEvent ())
handleValueOutputBase valueOutput event = withRef valueOutput $ \valueOutputPtr -> handleSuper' valueOutputPtr (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 100 "src/Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs" #-}
resizeValueOutputBase :: Ref ValueOutputBase -> Rectangle -> IO ()
resizeValueOutputBase valueOutput rectangle =
let (x_pos, y_pos, width, height) = fromRectangle rectangle
in withRef valueOutput $ \valueOutputPtr -> resizeSuper' valueOutputPtr 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 105 "src/Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs" #-}
hideValueOutputBase :: Ref ValueOutputBase -> IO ()
hideValueOutputBase valueOutput = withRef valueOutput $ \valueOutputPtr -> hideSuper' valueOutputPtr
showSuper' :: (Ptr ()) -> IO ((()))
showSuper' a1 =
let {a1' = id a1} in
showSuper''_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
{-# LINE 108 "src/Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs" #-}
showWidgetValueOutputBase :: Ref ValueOutputBase -> IO ()
showWidgetValueOutputBase valueOutput = withRef valueOutput $ \valueOutputPtr -> showSuper' valueOutputPtr
draw'' :: (Ptr ()) -> IO ()
draw'' a1 =
let {a1' = id a1} in
draw'''_ a1' >>
return ()
{-# LINE 113 "src/Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs" #-}
instance (impl ~ ( IO ())) => Op (Draw ()) ValueOutputBase orig impl where
runOp _ _ valueOutput = withRef valueOutput $ \valueOutputPtr -> draw'' valueOutputPtr
valueOutputHandle' :: (Ptr ()) -> (CInt) -> IO ((Int))
valueOutputHandle' a1 a2 =
let {a1' = id a1} in
let {a2' = id a2} in
valueOutputHandle''_ a1' a2' >>= \res ->
let {res' = fromIntegral res} in
return (res')
{-# LINE 116 "src/Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs" #-}
instance (impl ~ (Event -> IO (Either UnknownEvent ()))) => Op (Handle ()) ValueOutputBase orig impl where
runOp _ _ valueOutput event = withRef valueOutput (\p -> valueOutputHandle' 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 119 "src/Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs" #-}
instance (impl ~ (Rectangle -> IO ())) => Op (Resize ()) ValueOutputBase orig impl where
runOp _ _ valueOutput rectangle = withRef valueOutput $ \valueOutputPtr -> do
let (x_pos,y_pos,w_pos,h_pos) = fromRectangle rectangle
resize' valueOutputPtr x_pos y_pos w_pos h_pos
hide' :: (Ptr ()) -> IO ()
hide' a1 =
let {a1' = id a1} in
hide''_ a1' >>
return ()
{-# LINE 124 "src/Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs" #-}
instance (impl ~ ( IO ())) => Op (Hide ()) ValueOutputBase orig impl where
runOp _ _ valueOutput = withRef valueOutput $ \valueOutputPtr -> hide' valueOutputPtr
show' :: (Ptr ()) -> IO ()
show' a1 =
let {a1' = id a1} in
show''_ a1' >>
return ()
{-# LINE 127 "src/Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs" #-}
instance (impl ~ ( IO ())) => Op (ShowWidget ()) ValueOutputBase orig impl where
runOp _ _ valueOutput = withRef valueOutput $ \valueOutputPtr -> show' valueOutputPtr
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs.h Fl_OverriddenValue_Output_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/ValueOutput.chs.h Fl_OverriddenValue_Output_New"
overriddenWidgetNew''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr ())))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs.h Fl_Value_Output_New"
valueOutputNew''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO (C2HSImp.Ptr ()))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs.h Fl_Value_Output_New_WithLabel"
valueOutputNewWithLabel''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO (C2HSImp.Ptr ())))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs.h Fl_Value_Output_Destroy"
valueOutputDestroy''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs.h Fl_Value_Output_soft"
soft''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CChar))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs.h Fl_Value_Output_set_soft"
setSoft''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CChar -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs.h Fl_Value_Output_textfont"
textfont''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs.h Fl_Value_Output_set_textfont"
setTextfont''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs.h Fl_Value_Output_textsize"
textsize''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs.h Fl_Value_Output_set_textsize"
setTextsize''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs.h Fl_Value_Output_textcolor"
textcolor''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CUInt))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs.h Fl_Value_Output_set_textcolor"
setTextcolor''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs.h Fl_Value_Output_draw_super"
drawSuper''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs.h Fl_Value_Output_handle_super"
handleSuper''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs.h Fl_Value_Output_resize_super"
resizeSuper''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO ()))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs.h Fl_Value_Output_hide_super"
hideSuper''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs.h Fl_Value_Output_show_super"
showSuper''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs.h Fl_Value_Output_draw"
draw'''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs.h Fl_Value_Output_handle"
valueOutputHandle''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs.h Fl_Value_Output_resize"
resize''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO ()))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs.h Fl_Value_Output_hide"
hide''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/ValueOutput.chs.h Fl_Value_Output_show"
show''_ :: ((C2HSImp.Ptr ()) -> (IO ()))