essence-of-live-coding-gloss-0.2.6: General purpose live coding framework - Gloss backend
Safe HaskellNone
LanguageHaskell2010

LiveCoding.Gloss

Synopsis

Documentation

data GlossSettings Source #

Collect all settings that the gloss backend requires. Taken from rhine-gloss.

Constructors

GlossSettings 

Fields

data GlossVars Source #

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 

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.