termbox-bindings-0.1.0.5: Bindings to the Termbox library

Safe HaskellSafe
LanguageHaskell2010

Termbox

Synopsis

Documentation

putCell :: Int -> Int -> Cell -> IO () Source

setCursor :: Int -> Int -> IO () Source

data Event Source

A termbox event.

Constructors

KeyEvent Word8 Word16 Word32

A key event: mod, key, ch

ResizeEvent Int32 Int32

A resize event: w, h

MouseEvent Int32 Int32 Word16

A mouse event: w, h, key

data InputMode Source

Termbox input modes.

Constructors

InputMode 

Fields

isEsc :: Bool

ESC means E.TB_KEY_ESC

isAlt :: Bool

ESC enables E.TB_MOD_ALT for next key event

isMouse :: Bool

Enable mouse events

data OutputMode Source

Termbox output modes.

Constructors

Normal

8 colors.

M256

256 colors.

M216

216 colors.

Grayscale

24 shades of gray.

Unknown Int

A mystery.

init :: IO (Either String ()) Source

Initializes termbox.

peekEvent :: Int -> IO (Maybe Event) Source

Wait for an event with a timeout.

pollEvent :: IO (Either String Event) Source

Wait for an event.