module Ramus.DOM where
import Ramus.Signal
import Ramus.Time
data CoordinatePair = CoordinatePair { x :: Int, y :: Int }
data DimensionPair = DimensionPair { w :: Int, h :: Int }
keyPressed :: Int -> IO (Signal Bool)
keyPressed = undefined
mouseButton :: Int -> IO (Signal Bool)
mouseButton = undefined
data Touch = Touch
{ id :: String
, screenX :: Int
, screenY :: Int
, clientX :: Int
, clientY :: Int
, pageX :: Int
, pageY :: Int
, radiusX :: Int
, radiusY :: Int
, rotationAngle :: Float
, force :: Float
}
touch :: IO (Signal [Touch])
touch = undefined
tap :: IO (Signal Bool)
tap = do
touches <- touch
pure $ touches ~> \t -> case t of
[] -> False
_ -> True
mousePos :: IO (Signal CoordinatePair)
mousePos = undefined
animationFrame :: IO (Signal Time)
animationFrame = undefined
windowDimensions :: IO (Signal DimensionPair)
windowDimensions = undefined constant