Module

Signal.DOM

Package
purescript-signal
Repository
bodil/purescript-signal

#animationFrame Source

animationFrame :: Effect (Signal Time)

A signal which yields the current time, as determined by now, on every animation frame (see [https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame]).

#keyPressed Source

keyPressed :: Int -> Effect (Signal Boolean)

Creates a signal which will be true when the key matching the given key code is pressed, and false when it's released.

#mouseButton Source

mouseButton :: Int -> Effect (Signal Boolean)

Creates a signal which will be true when the given mouse button is pressed, and false when it's released.

#mouseButtonPressed Source

mouseButtonPressed :: MouseButton -> Effect (Signal Boolean)

Creates a signal which will be true when the given mouse button is pressed, and false when it's released. note: in IE8 and earlier you need to use MouseIE8MiddleButton if you want to query the middle button

#touch Source

touch :: Effect (Signal (Array Touch))

A signal containing the current state of the touch device, as described by the Touch record type.

#tap Source

tap :: Effect (Signal Boolean)

A signal which will be true when at least one finger is touching the touch device, and false otherwise.

#mousePos Source

mousePos :: Effect (Signal CoordinatePair)

A signal containing the current mouse position.

#windowDimensions Source

windowDimensions :: Effect (Signal DimensionPair)

A signal which contains the document window's current width and height.

#CoordinatePair Source

type CoordinatePair = { x :: Int, y :: Int }

#DimensionPair Source

type DimensionPair = { h :: Int, w :: Int }

#Touch Source

type Touch = { clientX :: Int, clientY :: Int, force :: Number, id :: String, pageX :: Int, pageY :: Int, radiusX :: Int, radiusY :: Int, rotationAngle :: Number, screenX :: Int, screenY :: Int }