glirc-2.40.1: Console IRC client
Copyright(c) Eric Mertens 2016
LicenseISC
Maintaineremertens@gmail.com
Safe HaskellSafe-Inferred
LanguageHaskell2010

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

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