-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Please see the README on Github at -- https://github.com/ChrisPenner/eve-cli#readme @package eve-cli @version 0.2.0.0 module Eve.CLI.Internal.State -- | Gets vty by checking if it has been initialized yet, if not it runs -- the initialization. getVty :: (MonadIO m, HasStates s) => AppT s m Vty module Eve.CLI.Internal.Render -- | Render the provided image to screen renderImage :: (MonadIO m, HasStates s) => Image -> AppT s m () -- | Terminal width in columns type Width = Int -- | Terminal height in rows type Height = Int -- | Get the current terminal size. Also see onResize getSize :: (MonadIO m, HasStates s) => AppT s m (Width, Height) module Eve.CLI.Internal.Events -- | Place initCLI first in your eve initialization block. It registers -- listeners for terminal events and sets up the renderer -- --
--   main :: IO ()
--   eve_ $ do
--     initCLI
--     -- add listeners here
--   
initCLI :: HasEvents s => AppT s IO () -- | React to terminal events Event onEvent :: (Typeable m, MonadIO m, HasEvents s) => (Event -> AppT s m result) -> AppT s m ListenerId -- | React to a Keypress onKeypress :: (Typeable m, MonadIO m, HasEvents s) => (Keypress -> AppT s m result) -> AppT s m ListenerId -- | React to a Mouse Down onMouseDown :: (Typeable m, MonadIO m, HasEvents s) => (MouseDown -> AppT s m result) -> AppT s m ListenerId -- | React to a Mouse Up onMouseUp :: (Typeable m, MonadIO m, HasEvents s) => (MouseUp -> AppT s m result) -> AppT s m ListenerId -- | React to a Terminal Resize onResize :: (Typeable m, MonadIO m, HasEvents s) => (Resize -> AppT s m result) -> AppT s m ListenerId -- | React to a Paste onPaste :: (Typeable m, MonadIO m, HasEvents s) => (Paste -> AppT s m result) -> AppT s m ListenerId -- | React to a Event onEvent_ :: (Typeable m, MonadIO m, HasEvents s) => (Event -> AppT s m result) -> AppT s m () -- | React to a Keypress onKeypress_ :: (Typeable m, MonadIO m, HasEvents s) => (Keypress -> AppT s m result) -> AppT s m () -- | React to a Mouse Down onMouseDown_ :: (Typeable m, MonadIO m, HasEvents s) => (MouseDown -> AppT s m result) -> AppT s m () -- | React to a Mouse Up onMouseUp_ :: (Typeable m, MonadIO m, HasEvents s) => (MouseUp -> AppT s m result) -> AppT s m () -- | React to a Terminal Resize onResize_ :: (Typeable m, MonadIO m, HasEvents s) => (Resize -> AppT s m result) -> AppT s m () -- | React to a Paste onPaste_ :: (Typeable m, MonadIO m, HasEvents s) => (Paste -> AppT s m result) -> AppT s m () -- | Type for terminal keypress events data Keypress Keypress :: Key -> [Modifier] -> Keypress -- | Type for terminal mouse down events data MouseDown MouseDown :: Int -> Int -> Button -> [Modifier] -> MouseDown -- | Type for terminal mouse up events data MouseUp MouseUp :: Int -> Int -> (Maybe Button) -> MouseUp -- | Type for terminal resize events data Resize Resize :: Int -> Int -> Resize -- | Type for terminal paste events data Paste Paste :: ByteString -> Paste -- | Type for terminal blur events data LostFocus LostFocus :: LostFocus -- | Type for terminal focus events data GainedFocus GainedFocus :: GainedFocus instance GHC.Show.Show Eve.CLI.Internal.Events.GainedFocus instance GHC.Classes.Eq Eve.CLI.Internal.Events.GainedFocus instance GHC.Show.Show Eve.CLI.Internal.Events.LostFocus instance GHC.Classes.Eq Eve.CLI.Internal.Events.LostFocus instance GHC.Show.Show Eve.CLI.Internal.Events.Paste instance GHC.Classes.Eq Eve.CLI.Internal.Events.Paste instance GHC.Show.Show Eve.CLI.Internal.Events.Resize instance GHC.Classes.Eq Eve.CLI.Internal.Events.Resize instance GHC.Show.Show Eve.CLI.Internal.Events.MouseUp instance GHC.Classes.Eq Eve.CLI.Internal.Events.MouseUp instance GHC.Show.Show Eve.CLI.Internal.Events.MouseDown instance GHC.Classes.Eq Eve.CLI.Internal.Events.MouseDown instance GHC.Show.Show Eve.CLI.Internal.Events.Keypress instance GHC.Classes.Eq Eve.CLI.Internal.Events.Keypress module Eve.CLI -- | Place initCLI first in your eve initialization block. It registers -- listeners for terminal events and sets up the renderer -- --
--   main :: IO ()
--   eve_ $ do
--     initCLI
--     -- add listeners here
--   
initCLI :: HasEvents s => AppT s IO () -- | React to terminal events Event onEvent :: (Typeable m, MonadIO m, HasEvents s) => (Event -> AppT s m result) -> AppT s m ListenerId -- | React to a Keypress onKeypress :: (Typeable m, MonadIO m, HasEvents s) => (Keypress -> AppT s m result) -> AppT s m ListenerId -- | React to a Mouse Down onMouseDown :: (Typeable m, MonadIO m, HasEvents s) => (MouseDown -> AppT s m result) -> AppT s m ListenerId -- | React to a Mouse Up onMouseUp :: (Typeable m, MonadIO m, HasEvents s) => (MouseUp -> AppT s m result) -> AppT s m ListenerId -- | React to a Terminal Resize onResize :: (Typeable m, MonadIO m, HasEvents s) => (Resize -> AppT s m result) -> AppT s m ListenerId -- | React to a Paste onPaste :: (Typeable m, MonadIO m, HasEvents s) => (Paste -> AppT s m result) -> AppT s m ListenerId -- | React to a Event onEvent_ :: (Typeable m, MonadIO m, HasEvents s) => (Event -> AppT s m result) -> AppT s m () -- | React to a Keypress onKeypress_ :: (Typeable m, MonadIO m, HasEvents s) => (Keypress -> AppT s m result) -> AppT s m () -- | React to a Mouse Down onMouseDown_ :: (Typeable m, MonadIO m, HasEvents s) => (MouseDown -> AppT s m result) -> AppT s m () -- | React to a Mouse Up onMouseUp_ :: (Typeable m, MonadIO m, HasEvents s) => (MouseUp -> AppT s m result) -> AppT s m () -- | React to a Terminal Resize onResize_ :: (Typeable m, MonadIO m, HasEvents s) => (Resize -> AppT s m result) -> AppT s m () -- | React to a Paste onPaste_ :: (Typeable m, MonadIO m, HasEvents s) => (Paste -> AppT s m result) -> AppT s m () -- | Type for terminal keypress events data Keypress Keypress :: Key -> [Modifier] -> Keypress -- | Type for terminal mouse down events data MouseDown MouseDown :: Int -> Int -> Button -> [Modifier] -> MouseDown -- | Type for terminal mouse up events data MouseUp MouseUp :: Int -> Int -> (Maybe Button) -> MouseUp -- | Type for terminal resize events data Resize Resize :: Int -> Int -> Resize -- | Type for terminal paste events data Paste Paste :: ByteString -> Paste -- | Type for terminal blur events data LostFocus LostFocus :: LostFocus -- | Type for terminal focus events data GainedFocus GainedFocus :: GainedFocus -- | Render the provided image to screen renderImage :: (MonadIO m, HasStates s) => Image -> AppT s m () -- | Get the current terminal size. Also see onResize getSize :: (MonadIO m, HasStates s) => AppT s m (Width, Height) -- | Terminal width in columns type Width = Int -- | Terminal height in rows type Height = Int