| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
LiveCoding.Gloss
Synopsis
- module LiveCoding.Gloss.PictureM
- module LiveCoding.Gloss.Debugger
- module Graphics.Gloss.Interface.IO.Game
- module Graphics.Gloss
- data GlossSettings = GlossSettings {}
- data GlossVars = GlossVars {}
- data GlossHandle = GlossHandle {}
- defaultSettings :: GlossSettings
- glossHandle :: GlossSettings -> Handle IO GlossHandle
- getPicture :: GlossVars -> IO Picture
- handleEvent :: Bool -> Event -> GlossVars -> IO GlossVars
- stepGloss :: Float -> GlossVars -> IO GlossVars
- glossWrapC :: GlossSettings -> Cell PictureM a b -> Cell (HandlingStateT IO) a (Maybe b)
Documentation
module LiveCoding.Gloss.PictureM
module LiveCoding.Gloss.Debugger
module Graphics.Gloss
data GlossSettings Source #
Collect all settings that the gloss backend requires.
Taken from rhine-gloss.
Constructors
| GlossSettings | |
Fields
| |
The concurrent variables needed to communicate with the gloss thread.
Constructors
| GlossVars | |
Fields
| |
data GlossHandle Source #
In a Handle, store a separate thread where the gloss main loop is executed,
and several concurrent variables to communicate with it.
Constructors
| GlossHandle | |
Fields | |
glossHandle :: GlossSettings -> Handle IO GlossHandle Source #
Will create a handle for communication with the gloss thread, and start gloss.
glossWrapC :: GlossSettings -> Cell PictureM a b -> Cell (HandlingStateT IO) a (Maybe b) Source #
Given a cell in the gloss monad PictureM,
start the gloss backend and connect the cell to it.
This introduces Handles containing the gloss background thread,
which need to be taken care of by calling runHandlingState
or a similar function.
The resulting cell never blocks,
but returns Nothing if there currently is no gloss tick.