shine-0.2.0.2: Declarative graphics for the browser using GHCJS

Copyright(c) Francesco Gazzetta 2016
LicenseMIT
Maintainerfrancygazz@gmail.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell98

Graphics.Shine.Input

Description

Datatypes representing inputs.

Synopsis

Documentation

data KeyState Source #

The state of a button on the keyboard

Constructors

Down 
Up 

data Modifiers Source #

The four key modifiers

Constructors

Modifiers 

data MouseBtn Source #

The three mouse buttons

Constructors

BtnLeft 
BtnRight 
BtnMiddle 

data Input Source #

Datatype representing all possible inputs

Instances

Eq Input Source # 

Methods

(==) :: Input -> Input -> Bool #

(/=) :: Input -> Input -> Bool #

Show Input Source # 

Methods

showsPrec :: Int -> Input -> ShowS #

show :: Input -> String #

showList :: [Input] -> ShowS #

toMouseBtn :: Word -> Maybe MouseBtn Source #

Convert a js mouse button identifier to the corresponding datatype

toKeyState :: Bool -> KeyState Source #

Convert a bool (from js) to a keystate