{-# LINE 1 "src/Graphics/UI/FLTK/LowLevel/Input.chs" #-}
{-# LANGUAGE CPP, RankNTypes, UndecidableInstances, GADTs, TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts, ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Graphics.UI.FLTK.LowLevel.Input
(
)
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_Enumerations
import Graphics.UI.FLTK.LowLevel.Fl_Types
import Graphics.UI.FLTK.LowLevel.Utils
import Graphics.UI.FLTK.LowLevel.Dispatch
import Graphics.UI.FLTK.LowLevel.Hierarchy
import Graphics.UI.FLTK.LowLevel.Base.Input
inputHandle' :: (Ptr ()) -> (CInt) -> IO ((Int))
inputHandle' a1 a2 =
let {a1' = id a1} in
let {a2' = id a2} in
inputHandle''_ a1' a2' >>= \res ->
let {res' = fromIntegral res} in
return (res')
{-# LINE 26 "src/Graphics/UI/FLTK/LowLevel/Input.chs" #-}
secretInputHandle' :: (Ptr ()) -> (CInt) -> IO ((Int))
secretInputHandle' a1 a2 =
let {a1' = id a1} in
let {a2' = id a2} in
secretInputHandle''_ a1' a2' >>= \res ->
let {res' = fromIntegral res} in
return (res')
{-# LINE 27 "src/Graphics/UI/FLTK/LowLevel/Input.chs" #-}
instance (impl ~ (Event -> IO (Either UnknownEvent ()))) => Op (Handle ()) Input orig impl where
runOp _ _ input event =
withRef
input
(\p -> do
t <- getInputType input
case t of
FlSecretInput -> secretInputHandle' p (fromIntegral . fromEnum $ event)
_ -> inputHandle' p (fromIntegral . fromEnum $ event)
)
>>= return . successOrUnknownEvent
draw'' :: (Ptr ()) -> IO ()
draw'' :: Ptr () -> IO ()
draw'' a1 :: Ptr ()
a1 =
let {a1' = id a1} in
Ptr () -> IO ()
draw'''_ Ptr ()
a1' 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 41 "src/Graphics/UI/FLTK/LowLevel/Input.chs" #-}
instance (impl ~ ( IO ())) => Op (Draw ()) Input orig impl where
runOp _ _ input = withRef input $ \inputPtr -> draw'' inputPtr
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 44 "src/Graphics/UI/FLTK/LowLevel/Input.chs" #-}
instance (impl ~ (Rectangle -> IO ())) => Op (Resize ()) Input orig impl where
runOp _ _ input rectangle = withRef input $ \inputPtr -> do
let (x_pos,y_pos,w_pos,h_pos) = fromRectangle rectangle
resize' inputPtr x_pos y_pos w_pos h_pos
hide' :: (Ptr ()) -> IO ()
hide' a1 =
let {a1' = id a1} in
hide''_ a1' >>
return ()
{-# LINE 49 "src/Graphics/UI/FLTK/LowLevel/Input.chs" #-}
instance (impl ~ ( IO ())) => Op (Hide ()) Input orig impl where
runOp _ _ input = withRef input $ \inputPtr -> hide' inputPtr
show' :: (Ptr ()) -> IO ()
show' a1 =
let {a1' = id a1} in
show''_ a1' >>
return ()
{-# LINE 52 "src/Graphics/UI/FLTK/LowLevel/Input.chs" #-}
instance (impl ~ ( IO ())) => Op (ShowWidget ()) Input orig impl where
runOp _ _ input = withRef input $ \inputPtr -> show' inputPtr
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Input.chs.h Fl_Input_handle"
inputHandle''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Input.chs.h Fl_Secret_Input_handle"
secretInputHandle''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Input.chs.h Fl_Input_draw"
draw'''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Input.chs.h Fl_Input_resize"
resize''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO ()))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Input.chs.h Fl_Input_hide"
hide''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Input.chs.h Fl_Input_show"
show''_ :: ((C2HSImp.Ptr ()) -> (IO ()))