rhine-gloss-0.5.0.0: Gloss backend for Rhine

Safe HaskellNone
LanguageHaskell2010

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

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.

buildGlossRhine Source #

Arguments

:: (Event -> Maybe a)

The event selector

-> GlossClSF a

The ClSF representing the game loop.

-> 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.

flowGloss Source #

Arguments

:: Display

Display mode (e.g. InWindow or FullScreen).

-> Color

Background color.

-> Int

Number of simulation steps per second of real time.

-> GlossRhine a

The gloss-compatible Rhine.

-> IO () 

The main function that will start the gloss backend and run the SN.

module FRP.Rhine