reactive-glut-0.1.2: Connects Reactive and GLUTSource codeContentsIndex
FRP.Reactive.GLUT.Adapter
Stabilityexperimental
Maintainerconal@conal.net
Description
Connect Reactive + GLUT
Synopsis
adaptSimple :: String -> Sink (UI -> Behavior Action)
adapt :: Sink (UI -> Behavior Action)
simpleInit :: String -> IO ()
data UI = UI {
mousePosition :: Behavior (Double, Double)
leftButtonPressed :: Event ()
rightButtonPressed :: Event ()
keyAction :: Event (KeyState, Key)
framePass :: Event ()
}
data KeyState
= Down
| Up
data Key
= Char Char
| SpecialKey SpecialKey
keyPressed :: UI -> Event Key
uiIntegral :: (VectorSpace v, Scalar v ~ TimeT) => (UI -> Behavior v) -> UI -> Behavior v
Documentation
adaptSimple :: String -> Sink (UI -> Behavior Action)Source
Adapter to connect FRP.Reactive with GLUT. Uses given window title and a simple canned initialization. Or do your own initialization and then invoke adapt.
adapt :: Sink (UI -> Behavior Action)Source
Adapter to connect FRP.Reactive with GLUT. Assumes that GL/GLUT have been initialized as desired.
simpleInit :: String -> IO ()Source
Simple initialization for GL graphics
data UI Source
Simple UI type.
Constructors
UI
mousePosition :: Behavior (Double, Double)
leftButtonPressed :: Event ()
rightButtonPressed :: Event ()
keyAction :: Event (KeyState, Key)
framePass :: Event ()
data KeyState Source
Constructors
Down
Up
show/hide Instances
data Key Source
Key pressed
Constructors
Char Char
SpecialKey SpecialKey
show/hide Instances
keyPressed :: UI -> Event KeySource
Key press events.
uiIntegral :: (VectorSpace v, Scalar v ~ TimeT) => (UI -> Behavior v) -> UI -> Behavior vSource
Integral tracking frame sampling
Produced by Haddock version 2.3.0