packages feed

brillo-2.0.0: Brillo/Data/Controller.hs

module Brillo.Data.Controller (Controller (..))
where

import Brillo.Data.Cursor (CursorShape)
import Brillo.Data.ViewPort


-- | Functions to asynchronously control a `Brillo` display.
data Controller
  = Controller
  { controllerSetRedraw :: IO ()
  -- ^ Indicate that we want the picture to be redrawn.
  , controllerModifyViewPort :: (ViewPort -> IO ViewPort) -> IO ()
  -- ^ Modify the current viewport, also indicating that it should be redrawn.
  , controllerSetCursor :: CursorShape -> IO ()
  -- ^ Set the mouse cursor shape.
  }