Gleam-0.1.1.0: HTML Canvas graphics, animations and simulations.

Safe HaskellSafe
LanguageHaskell2010

InputEvent

Synopsis

Documentation

data InputEvent Source #

An input event.

Constructors

EventKey Key KeyState

A key or mouse button event

EventMouse Point Point

A mouse motion event

Instances

Eq InputEvent Source # 

Methods

(==) :: InputEvent -> InputEvent -> Bool

(/=) :: InputEvent -> InputEvent -> Bool

Show InputEvent Source # 

Methods

showsPrec :: Int -> InputEvent -> ShowS

show :: InputEvent -> String

showList :: [InputEvent] -> ShowS

data Key Source #

A key.

Constructors

Char Char

A key that can be represented by a character

SpecialKey SpecialKey

A special key.

Mouse Point

A mouse button.

Instances

Eq Key Source # 

Methods

(==) :: Key -> Key -> Bool

(/=) :: Key -> Key -> Bool

Ord Key Source # 

Methods

compare :: Key -> Key -> Ordering

(<) :: Key -> Key -> Bool

(<=) :: Key -> Key -> Bool

(>) :: Key -> Key -> Bool

(>=) :: Key -> Key -> Bool

max :: Key -> Key -> Key

min :: Key -> Key -> Key

Show Key Source # 

Methods

showsPrec :: Int -> Key -> ShowS

show :: Key -> String

showList :: [Key] -> ShowS

data KeyState Source #

State of the key event.

Constructors

Down 
Up 

Instances

Eq KeyState Source # 

Methods

(==) :: KeyState -> KeyState -> Bool

(/=) :: KeyState -> KeyState -> Bool

Ord KeyState Source # 

Methods

compare :: KeyState -> KeyState -> Ordering

(<) :: KeyState -> KeyState -> Bool

(<=) :: KeyState -> KeyState -> Bool

(>) :: KeyState -> KeyState -> Bool

(>=) :: KeyState -> KeyState -> Bool

max :: KeyState -> KeyState -> KeyState

min :: KeyState -> KeyState -> KeyState

Show KeyState Source # 

Methods

showsPrec :: Int -> KeyState -> ShowS

show :: KeyState -> String

showList :: [KeyState] -> ShowS