reactive-glut-0.1.5: 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 ()
Action
Sink
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
SpecialKey (KeyF1, KeyF2, KeyF3, KeyF4, KeyF5, KeyF6, KeyF7, KeyF8, KeyF9, KeyF10, KeyF11, KeyF12, KeyLeft, KeyUp, KeyRight, KeyDown, KeyPageUp, KeyPageDown, KeyHome, KeyEnd, KeyInsert)
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
Action
Sink
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
SpecialKey (KeyF1, KeyF2, KeyF3, KeyF4, KeyF5, KeyF6, KeyF7, KeyF8, KeyF9, KeyF10, KeyF11, KeyF12, KeyLeft, KeyUp, KeyRight, KeyDown, KeyPageUp, KeyPageDown, KeyHome, KeyEnd, KeyInsert)
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.4.2