module FRP.Reactive.GLUT.UI
( UI(..)
, Key(..), SpecialKey(..)
, uiIntegral
) where
import Control.Applicative (liftA2)
import Graphics.UI.GLUT(SpecialKey(..))
import Data.VectorSpace
import FRP.Reactive
data UI = UI {
mousePosition :: Behavior (Double,Double),
leftMousePressed :: Event (),
rightMousePressed :: Event (),
keyPressed :: Event Key,
framePass :: Event ()
}
data Key = Char Char | SpecialKey SpecialKey
uiIntegral :: VectorSpace v TimeT =>
(UI -> Behavior v) -> (UI -> Behavior v)
uiIntegral = liftA2 integral framePass