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 :: (Clock GlossM cl, GetClockProxy cl) => GlossSettings -> Rhine GlossM cl () () -> IO ()
- flowGlossClSF :: GlossSettings -> GlossClSF -> 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 # | |
MonadSchedule 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.
flowGloss :: (Clock GlossM cl, GetClockProxy cl) => GlossSettings -> Rhine GlossM cl () () -> IO () Source #
The main function that will start the gloss
backend and run the Rhine
:: GlossSettings | |
-> GlossClSF | The |
-> IO () |