frpnow-gloss-0.12: Program awesome stuff with Gloss and frpnow!

Copyright(c) Atze van der Ploeg 2015
LicenseBSD-style
Maintaineratzeus@gmail.org
Stabilityprovisional
Portabilityportable
Safe HaskellNone
LanguageHaskell98

Control.FRPNow.Gloss

Description

This module provides interoperability of FRPNow and the gloss system.

Synopsis

Documentation

type GEvent = Event Source

Alias for Event to prevent name clash with Event.

type Time = Float Source

The gloss type for time.

runNowGloss Source

Arguments

:: Display

Display mode.

-> Color

Background color.

-> Int

Maximum number of frames per second

-> (Behavior Time -> EvStream GEvent -> Now (Behavior Picture))

A now computation giving the picture to be displayed on the screen, taking the behavior of time and the eventstream of gloss events.

-> IO () 

Run a Now computation which produced a behavior of type Picture, and draw that on screen.

runNowGlossPure Source

Arguments

:: Display

Display mode.

-> Color

Background color.

-> Int

Maximum number of frames per second

-> (Behavior Time -> EvStream GEvent -> Behavior (Behavior Picture))

A now computation giving the picture to be displayed on the screen, taking the behavior of time and the eventstream of gloss events.

-> IO () 

Like runNowGloss, but does not allow IO.

toMouseMoves :: EvStream GEvent -> EvStream (Float, Float) Source

Filter the mouse moves from an event stream of gloss events

toMousePos :: EvStream GEvent -> Behavior (Behavior (Float, Float)) Source

Get a behavior of the mouse position from an event stream of gloss events

toKeysDown :: EvStream GEvent -> Behavior (Behavior (Set Key)) Source

Get a behavior of the set of currently pressed keys from an event stream of gloss events