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
.
- type GlossClock a = SequentialClock Identity (SelectClock GlossEventClock a) GlossSimulationClock_
- type GlossRhine a = Rhine Identity (GlossClock a) () Picture
- type GlossSyncSF a = SyncSF Identity GlossSimulationClock [a] Picture
- buildGlossRhine :: (Event -> Maybe a) -> GlossSyncSF a -> GlossRhine a
- flowGloss :: Display -> Color -> Int -> GlossRhine a -> IO ()
Documentation
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.
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 GlossSyncSF a = SyncSF Identity GlossSimulationClock [a] Picture Source #
The type of a SyncSF
that you have to implement to get a gloss
app.
:: (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.