| Copyright | (c) Eric Mertens 2016 |
|---|---|
| License | ISC |
| Maintainer | emertens@gmail.com |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Client.EventLoop
Description
This module is responsible for dispatching user-input, network, and timer events to the correct module. It renders the user interface once per event.
Synopsis
- eventLoop :: Vty -> ClientState -> IO ()
- updateTerminalSize :: Vty -> ClientState -> IO ClientState
- data ClientEvent
Documentation
eventLoop :: Vty -> ClientState -> IO () Source #
Apply this function to an initial ClientState to launch the client.
updateTerminalSize :: Vty -> ClientState -> IO ClientState Source #
Update the height and width fields of the client state
data ClientEvent Source #
Sum of the five possible event types the event loop handles
Constructors
| VtyEvent InternalEvent | Key presses and resizing |
| NetworkEvents (NonEmpty (Text, NetworkEvent)) | Incoming network events |
| TimerEvent Text TimedAction | Timed action and the applicable network |
| ExtTimerEvent Int | extension ID |
| ThreadEvent Int ThreadEntry |