From ea131c9771937b42bb5efef2b95b66d1595d388d Mon Sep 17 00:00:00 2001 From: Justin Leitgeb Date: Tue, 10 Sep 2013 12:10:34 -0500 Subject: [PATCH] Convert Touch docs. --- libraries/Touch.elm | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/libraries/Touch.elm b/libraries/Touch.elm index 238416d..d3419fe 100644 --- a/libraries/Touch.elm +++ b/libraries/Touch.elm @@ -1,24 +1,35 @@ --- This is an early version of the touch library. It will likely grow to --- include gestures that would be useful for both games and web-pages. module Touch where +{-| This is an early version of the touch library. It will likely grow to +include gestures that would be useful for both games and web-pages. + +# Touches +@docs touches + +# Gestures +@docs taps +-} + import Signal (Signal) import Native.Touch import Time (Time) --- Every `Touch` has `xy` coordinates. It also has an identifier `id` to --- distinguish one touch from another. --- --- A touch also keeps info about the intial point and time of contact: --- `x0`, `y0`, and `t0`. This helps compute more complicated gestures --- like taps, drags, and swipes which need to know about timing or direction. -type Touch = { x:Int, y:Int, id:Int, x0:Int, y0:Int, t0:Time } +{-| +Every `Touch` has `xy` coordinates. It also has an identifier `id` to +distinguish one touch from another. --- A list of ongoing touches. +A touch also keeps info about the initial point and time of contact: +`x0`, `y0`, and `t0`. This helps compute more complicated gestures +like taps, drags, and swipes which need to know about timing or direction. +type Touch = { x:Int, y:Int, id:Int, x0:Int, y0:Int, t0:Time } +-} + +{-| A list of ongoing touches. -} touches : Signal [Touch] touches = Native.Touch.touches --- The last position that was tapped. Default value is `{x=0,y=0}`. --- Updates whenever the user taps the screen. +{-| The last position that was tapped. Default value is `{x=0,y=0}`. +Updates whenever the user taps the screen. +-} taps : Signal { x:Int, y:Int } -taps = Native.Touch.taps \ No newline at end of file +taps = Native.Touch.taps