module JSDOM.Generated.Touch
(getClientX, getClientY, getScreenX, getScreenY, getPageX,
getPageY, getTarget, getIdentifier, getWebkitRadiusX,
getWebkitRadiusY, getWebkitRotationAngle, getWebkitForce,
Touch(..), gTypeTouch)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, round, realToFrac, fmap, Show, Read, Eq, Ord, Maybe(..))
import qualified Prelude (error)
import Data.Typeable (Typeable)
import Data.Traversable (mapM)
import Language.Javascript.JSaddle (JSM(..), JSVal(..), JSString, strictEqual, toJSVal, valToStr, valToNumber, valToBool, js, jss, jsf, jsg, function, asyncFunction, new, array, jsUndefined, (!), (!!))
import Data.Int (Int64)
import Data.Word (Word, Word64)
import JSDOM.Types
import Control.Applicative ((<$>))
import Control.Monad (void)
import Control.Lens.Operators ((^.))
import JSDOM.EventTargetClosures (EventName, unsafeEventName)
import JSDOM.Enums
getClientX :: (MonadDOM m) => Touch -> m Int
getClientX self
= liftDOM (round <$> ((self ^. js "clientX") >>= valToNumber))
getClientY :: (MonadDOM m) => Touch -> m Int
getClientY self
= liftDOM (round <$> ((self ^. js "clientY") >>= valToNumber))
getScreenX :: (MonadDOM m) => Touch -> m Int
getScreenX self
= liftDOM (round <$> ((self ^. js "screenX") >>= valToNumber))
getScreenY :: (MonadDOM m) => Touch -> m Int
getScreenY self
= liftDOM (round <$> ((self ^. js "screenY") >>= valToNumber))
getPageX :: (MonadDOM m) => Touch -> m Int
getPageX self
= liftDOM (round <$> ((self ^. js "pageX") >>= valToNumber))
getPageY :: (MonadDOM m) => Touch -> m Int
getPageY self
= liftDOM (round <$> ((self ^. js "pageY") >>= valToNumber))
getTarget :: (MonadDOM m) => Touch -> m EventTarget
getTarget self
= liftDOM ((self ^. js "target") >>= fromJSValUnchecked)
getIdentifier :: (MonadDOM m) => Touch -> m Word
getIdentifier self
= liftDOM (round <$> ((self ^. js "identifier") >>= valToNumber))
getWebkitRadiusX :: (MonadDOM m) => Touch -> m Int
getWebkitRadiusX self
= liftDOM
(round <$> ((self ^. js "webkitRadiusX") >>= valToNumber))
getWebkitRadiusY :: (MonadDOM m) => Touch -> m Int
getWebkitRadiusY self
= liftDOM
(round <$> ((self ^. js "webkitRadiusY") >>= valToNumber))
getWebkitRotationAngle :: (MonadDOM m) => Touch -> m Float
getWebkitRotationAngle self
= liftDOM
(realToFrac <$>
((self ^. js "webkitRotationAngle") >>= valToNumber))
getWebkitForce :: (MonadDOM m) => Touch -> m Float
getWebkitForce self
= liftDOM
(realToFrac <$> ((self ^. js "webkitForce") >>= valToNumber))