module Graphics.Gloss.Data.Controller
        ( Controller    (..))
where
import Graphics.Gloss.Data.ViewPort


-- | Functions to asynchronously control a `Gloss` display.
data Controller
        = Controller
        { -- | Indicate that we want the picture to be redrawn.
          Controller -> IO ()
controllerSetRedraw       :: IO ()

          -- | Modify the current viewport, also indicating that it should be redrawn.
        , Controller -> (ViewPort -> IO ViewPort) -> IO ()
controllerModifyViewPort  :: (ViewPort -> IO ViewPort) -> IO () }