Safe Haskell | None |
---|---|
Language | Haskell2010 |
Wrapper library to write Gloss applications in Rhine.
gloss
acts as the backend here.
A Rhine app with the Gloss backend must use the GlossClock
,
since the gloss
API only offers callbacks.
In order to run such a reactive program, you have to use flowGloss
.
Synopsis
- type GlossSyncSF a = SyncSF Identity GlossSimulationClock [a] Picture
- type GlossRhine a = Rhine Identity (GlossClock a) () Picture
- type GlossClock a = SequentialClock Identity (SelectClock GlossEventClock a) GlossSimulationClock_
- buildGlossRhine :: (Event -> Maybe a) -> GlossSyncSF a -> GlossRhine a
- flowGloss :: Display -> Color -> Int -> GlossRhine a -> IO ()
- module FRP.Rhine.SyncSF
- module FRP.Rhine
- module Graphics.Gloss
- module Control.Arrow
Documentation
type GlossSyncSF a = SyncSF Identity GlossSimulationClock [a] Picture Source #
The type of a SyncSF
that you have to implement to get a gloss
app.
type GlossRhine a = Rhine Identity (GlossClock a) () Picture Source #
The type of a valid Rhine
that can be run by gloss
.
a
is the type of subevents that are selected.
type GlossClock a = SequentialClock Identity (SelectClock GlossEventClock a) GlossSimulationClock_ Source #
The overall clock of a valid rhine
SF
that can be run by gloss
.
a
is the type of subevents that are selected.
:: (Event -> Maybe a) | The event selector |
-> GlossSyncSF a | The |
-> GlossRhine a |
For most applications, it is sufficient to implement a single synchronous signal function that is called with a list of all relevant events that occurred in the last tick.
:: Display | Display mode (e.g. |
-> Color | Background color. |
-> Int | Number of simulation steps per second of real time. |
-> GlossRhine a | The |
-> IO () |
The main function that will start the gloss
backend and run the SF
.
module FRP.Rhine.SyncSF
module FRP.Rhine
module Graphics.Gloss
module Control.Arrow