glirc-2.20.1: Console IRC client

Copyright(c) Eric Mertens, 2016
LicenseISC
Maintaineremertens@gmail.com
Safe HaskellNone
LanguageHaskell2010

Client.State.Window

Contents

Description

This module defines types and operations used to store messages for display in the client's buffers.

Synopsis

Windows

data Window Source #

A Window tracks all of the messages and metadata for a particular message buffer.

Constructors

Window 

Fields

Window lines

data WindowLine Source #

A single message to be displayed in a window

Constructors

WindowLine 

Fields

wlImage :: Lens' WindowLine Image Source #

Lens for the _wlImage field viewed in unpacked form.

wlFullImage :: Lens' WindowLine Image Source #

Lens for the _wlFullImage field viewed in unpacked form.

Window line importance

data WindowLineImportance Source #

Flag for the important of a message being added to a window

Constructors

WLBoring

Don't update unread count

WLNormal

Increment unread count

WLImportant

Increment unread count and set important flag

Window operations

emptyWindow :: Window Source #

A window with no messages

addToWindow :: WindowLine -> Window -> Window Source #

Adds a given line to a window as the newest message. Window's unread count will be updated according to the given importance.

windowSeen :: Window -> Window Source #

Update the window clearing the unread count and important flag.