Copyright | (c) Ivan Perez and Manuel Baerenz 2016 |
---|---|
License | BSD3 |
Maintainer | ivan.perez@keera.co.uk |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Sometimes it is beneficial to give control to an external main loop, for example OpenGL or a hardware-clocked audio server like JACK. This module makes Dunai compatible with external main loops.
Synopsis
- type ReactHandle m = IORef (MSF m () ())
- reactInit :: MonadIO m => MSF m () () -> m (ReactHandle m)
- react :: MonadIO m => ReactHandle m -> m ()
Documentation
type ReactHandle m = IORef (MSF m () ()) Source #
reactInit :: MonadIO m => MSF m () () -> m (ReactHandle m) Source #
Needs to be called before the external main loop is dispatched.
react :: MonadIO m => ReactHandle m -> m () Source #
The callback that needs to be called by the external loop at every cycle.