| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
FRP.Rhine.Gloss
Description
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 GlossClSF a = ClSF 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) -> GlossClSF a -> GlossRhine a
- flowGloss :: Display -> Color -> Int -> GlossRhine a -> IO ()
- module FRP.Rhine.ClSF
- module FRP.Rhine
- module Graphics.Gloss
- module Control.Arrow
Documentation
type GlossClSF a = ClSF Identity GlossSimulationClock [a] Picture Source #
The type of a ClSF 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 SN that can be run by gloss.
a is the type of subevents that are selected.
Arguments
| :: (Event -> Maybe a) | The event selector |
| -> GlossClSF a | The |
| -> GlossRhine a |
For most applications, it is sufficient to implement a single signal function that is called with a list of all relevant events that occurred in the last tick.
Arguments
| :: 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 SN.
module FRP.Rhine.ClSF
module FRP.Rhine
module Graphics.Gloss
module Control.Arrow