glirc-2.33.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. The normal message line consists of the image prefix and the image. This allows line wrapping to be applied separately to the image and prefix so that wrapped messages can fall to the right side of the prefix.

Constructors

WindowLine 

Fields

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.

windowActivate :: Window -> Window Source #

Update the window when it first becomes active. If only boring messages have been added since last time the marker will be hidden.

windowDeactivate :: Window -> Window Source #

Update the window when it becomes inactive. This resets the activity marker to the bottom of the window.

Packed time