Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
A pure gloss
backend for Rhine.
To run pure Rhine apps with gloss
,
write a clocked signal function (ClSF
) in the GlossClock
and use flowGloss
.
Synopsis
- data GlossM a
- paint :: Picture -> GlossM ()
- clear :: GlossM ()
- paintAll :: Picture -> GlossM ()
- data GlossClock = GlossClock
- type GlossClSF = ClSF GlossM GlossClock () Picture
- currentEvent :: ClSF GlossM GlossClock () (Maybe Event)
- flowGloss :: GlossSettings -> GlossClSF -> IO ()
- flowGlossWithWorldMSF :: Clock GlossM cl => GlossSettings -> cl -> MSF GlossM (Time cl, Tag cl) b -> IO ()
Documentation
A pure monad in which all effects caused by the gloss
backend take place.
Instances
Applicative GlossM Source # | |
Functor GlossM Source # | |
Monad GlossM Source # | |
Clock GlossM GlossClock Source # | |
Defined in FRP.Rhine.Gloss.Pure type Time GlossClock # type Tag GlossClock # initClock :: GlossClock -> RunningClockInit GlossM (Time GlossClock) (Tag GlossClock) # |
data GlossClock Source #
The overall clock of a pure rhine
ClSF
that can be run by gloss
.
It ticks both on events (tag = Just Event
) and simulation steps (tag = Nothing
).
Instances
Semigroup GlossClock Source # | |
Defined in FRP.Rhine.Gloss.Pure (<>) :: GlossClock -> GlossClock -> GlossClock # sconcat :: NonEmpty GlossClock -> GlossClock # stimes :: Integral b => b -> GlossClock -> GlossClock # | |
GetClockProxy GlossClock Source # | |
Defined in FRP.Rhine.Gloss.Pure | |
Clock GlossM GlossClock Source # | |
Defined in FRP.Rhine.Gloss.Pure type Time GlossClock # type Tag GlossClock # initClock :: GlossClock -> RunningClockInit GlossM (Time GlossClock) (Tag GlossClock) # | |
type Tag GlossClock Source # | |
Defined in FRP.Rhine.Gloss.Pure | |
type Time GlossClock Source # | |
Defined in FRP.Rhine.Gloss.Pure |
currentEvent :: ClSF GlossM GlossClock () (Maybe Event) Source #
Observe whether there was an event this tick, and which one.
:: GlossSettings | |
-> GlossClSF | The |
-> IO () |
The main function that will start the gloss
backend and run the SN
(in the case of the combined clock).