module JSDOM.Generated.SVGSVGElement
(suspendRedraw, suspendRedraw_, unsuspendRedraw,
unsuspendRedrawAll, forceRedraw, pauseAnimations,
unpauseAnimations, animationsPaused, animationsPaused_,
getCurrentTime, getCurrentTime_, setCurrentTime,
getIntersectionList, getIntersectionList_, getEnclosureList,
getEnclosureList_, checkIntersection, checkIntersection_,
checkEnclosure, checkEnclosure_, deselectAll, createSVGNumber,
createSVGNumber_, createSVGLength, createSVGLength_,
createSVGAngle, createSVGAngle_, createSVGPoint, createSVGPoint_,
createSVGMatrix, createSVGMatrix_, createSVGRect, createSVGRect_,
createSVGTransform, createSVGTransform_,
createSVGTransformFromMatrix, createSVGTransformFromMatrix_,
getElementById, getElementById_, getX, getY, getWidth, getHeight,
setContentScriptType, getContentScriptType, setContentStyleType,
getContentStyleType, getViewport, getPixelUnitToMillimeterX,
getPixelUnitToMillimeterY, getScreenPixelToMillimeterX,
getScreenPixelToMillimeterY, getUseCurrentView, getCurrentView,
setCurrentScale, getCurrentScale, getCurrentTranslate,
SVGSVGElement(..), gTypeSVGSVGElement)
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
suspendRedraw ::
(MonadDOM m) => SVGSVGElement -> Maybe Word -> m Word
suspendRedraw self maxWaitMilliseconds
= liftDOM
(round <$>
((self ^. jsf "suspendRedraw" [toJSVal maxWaitMilliseconds]) >>=
valToNumber))
suspendRedraw_ ::
(MonadDOM m) => SVGSVGElement -> Maybe Word -> m ()
suspendRedraw_ self maxWaitMilliseconds
= liftDOM
(void (self ^. jsf "suspendRedraw" [toJSVal maxWaitMilliseconds]))
unsuspendRedraw ::
(MonadDOM m) => SVGSVGElement -> Maybe Word -> m ()
unsuspendRedraw self suspendHandleId
= liftDOM
(void (self ^. jsf "unsuspendRedraw" [toJSVal suspendHandleId]))
unsuspendRedrawAll :: (MonadDOM m) => SVGSVGElement -> m ()
unsuspendRedrawAll self
= liftDOM (void (self ^. jsf "unsuspendRedrawAll" ()))
forceRedraw :: (MonadDOM m) => SVGSVGElement -> m ()
forceRedraw self = liftDOM (void (self ^. jsf "forceRedraw" ()))
pauseAnimations :: (MonadDOM m) => SVGSVGElement -> m ()
pauseAnimations self
= liftDOM (void (self ^. jsf "pauseAnimations" ()))
unpauseAnimations :: (MonadDOM m) => SVGSVGElement -> m ()
unpauseAnimations self
= liftDOM (void (self ^. jsf "unpauseAnimations" ()))
animationsPaused :: (MonadDOM m) => SVGSVGElement -> m Bool
animationsPaused self
= liftDOM ((self ^. jsf "animationsPaused" ()) >>= valToBool)
animationsPaused_ :: (MonadDOM m) => SVGSVGElement -> m ()
animationsPaused_ self
= liftDOM (void (self ^. jsf "animationsPaused" ()))
getCurrentTime :: (MonadDOM m) => SVGSVGElement -> m Float
getCurrentTime self
= liftDOM
(realToFrac <$>
((self ^. jsf "getCurrentTime" ()) >>= valToNumber))
getCurrentTime_ :: (MonadDOM m) => SVGSVGElement -> m ()
getCurrentTime_ self
= liftDOM (void (self ^. jsf "getCurrentTime" ()))
setCurrentTime ::
(MonadDOM m) => SVGSVGElement -> Maybe Float -> m ()
setCurrentTime self seconds
= liftDOM (void (self ^. jsf "setCurrentTime" [toJSVal seconds]))
getIntersectionList ::
(MonadDOM m, IsSVGElement referenceElement) =>
SVGSVGElement -> SVGRect -> Maybe referenceElement -> m NodeList
getIntersectionList self rect referenceElement
= liftDOM
((self ^. jsf "getIntersectionList"
[toJSVal rect, toJSVal referenceElement])
>>= fromJSValUnchecked)
getIntersectionList_ ::
(MonadDOM m, IsSVGElement referenceElement) =>
SVGSVGElement -> SVGRect -> Maybe referenceElement -> m ()
getIntersectionList_ self rect referenceElement
= liftDOM
(void
(self ^. jsf "getIntersectionList"
[toJSVal rect, toJSVal referenceElement]))
getEnclosureList ::
(MonadDOM m, IsSVGElement referenceElement) =>
SVGSVGElement -> SVGRect -> Maybe referenceElement -> m NodeList
getEnclosureList self rect referenceElement
= liftDOM
((self ^. jsf "getEnclosureList"
[toJSVal rect, toJSVal referenceElement])
>>= fromJSValUnchecked)
getEnclosureList_ ::
(MonadDOM m, IsSVGElement referenceElement) =>
SVGSVGElement -> SVGRect -> Maybe referenceElement -> m ()
getEnclosureList_ self rect referenceElement
= liftDOM
(void
(self ^. jsf "getEnclosureList"
[toJSVal rect, toJSVal referenceElement]))
checkIntersection ::
(MonadDOM m, IsSVGElement element) =>
SVGSVGElement -> Maybe element -> SVGRect -> m Bool
checkIntersection self element rect
= liftDOM
((self ^. jsf "checkIntersection" [toJSVal element, toJSVal rect])
>>= valToBool)
checkIntersection_ ::
(MonadDOM m, IsSVGElement element) =>
SVGSVGElement -> Maybe element -> SVGRect -> m ()
checkIntersection_ self element rect
= liftDOM
(void
(self ^. jsf "checkIntersection" [toJSVal element, toJSVal rect]))
checkEnclosure ::
(MonadDOM m, IsSVGElement element) =>
SVGSVGElement -> Maybe element -> SVGRect -> m Bool
checkEnclosure self element rect
= liftDOM
((self ^. jsf "checkEnclosure" [toJSVal element, toJSVal rect]) >>=
valToBool)
checkEnclosure_ ::
(MonadDOM m, IsSVGElement element) =>
SVGSVGElement -> Maybe element -> SVGRect -> m ()
checkEnclosure_ self element rect
= liftDOM
(void
(self ^. jsf "checkEnclosure" [toJSVal element, toJSVal rect]))
deselectAll :: (MonadDOM m) => SVGSVGElement -> m ()
deselectAll self = liftDOM (void (self ^. jsf "deselectAll" ()))
createSVGNumber :: (MonadDOM m) => SVGSVGElement -> m SVGNumber
createSVGNumber self
= liftDOM
((self ^. jsf "createSVGNumber" ()) >>= fromJSValUnchecked)
createSVGNumber_ :: (MonadDOM m) => SVGSVGElement -> m ()
createSVGNumber_ self
= liftDOM (void (self ^. jsf "createSVGNumber" ()))
createSVGLength :: (MonadDOM m) => SVGSVGElement -> m SVGLength
createSVGLength self
= liftDOM
((self ^. jsf "createSVGLength" ()) >>= fromJSValUnchecked)
createSVGLength_ :: (MonadDOM m) => SVGSVGElement -> m ()
createSVGLength_ self
= liftDOM (void (self ^. jsf "createSVGLength" ()))
createSVGAngle :: (MonadDOM m) => SVGSVGElement -> m SVGAngle
createSVGAngle self
= liftDOM
((self ^. jsf "createSVGAngle" ()) >>= fromJSValUnchecked)
createSVGAngle_ :: (MonadDOM m) => SVGSVGElement -> m ()
createSVGAngle_ self
= liftDOM (void (self ^. jsf "createSVGAngle" ()))
createSVGPoint :: (MonadDOM m) => SVGSVGElement -> m SVGPoint
createSVGPoint self
= liftDOM
((self ^. jsf "createSVGPoint" ()) >>= fromJSValUnchecked)
createSVGPoint_ :: (MonadDOM m) => SVGSVGElement -> m ()
createSVGPoint_ self
= liftDOM (void (self ^. jsf "createSVGPoint" ()))
createSVGMatrix :: (MonadDOM m) => SVGSVGElement -> m SVGMatrix
createSVGMatrix self
= liftDOM
((self ^. jsf "createSVGMatrix" ()) >>= fromJSValUnchecked)
createSVGMatrix_ :: (MonadDOM m) => SVGSVGElement -> m ()
createSVGMatrix_ self
= liftDOM (void (self ^. jsf "createSVGMatrix" ()))
createSVGRect :: (MonadDOM m) => SVGSVGElement -> m SVGRect
createSVGRect self
= liftDOM ((self ^. jsf "createSVGRect" ()) >>= fromJSValUnchecked)
createSVGRect_ :: (MonadDOM m) => SVGSVGElement -> m ()
createSVGRect_ self
= liftDOM (void (self ^. jsf "createSVGRect" ()))
createSVGTransform ::
(MonadDOM m) => SVGSVGElement -> m SVGTransform
createSVGTransform self
= liftDOM
((self ^. jsf "createSVGTransform" ()) >>= fromJSValUnchecked)
createSVGTransform_ :: (MonadDOM m) => SVGSVGElement -> m ()
createSVGTransform_ self
= liftDOM (void (self ^. jsf "createSVGTransform" ()))
createSVGTransformFromMatrix ::
(MonadDOM m) => SVGSVGElement -> SVGMatrix -> m SVGTransform
createSVGTransformFromMatrix self matrix
= liftDOM
((self ^. jsf "createSVGTransformFromMatrix" [toJSVal matrix]) >>=
fromJSValUnchecked)
createSVGTransformFromMatrix_ ::
(MonadDOM m) => SVGSVGElement -> SVGMatrix -> m ()
createSVGTransformFromMatrix_ self matrix
= liftDOM
(void
(self ^. jsf "createSVGTransformFromMatrix" [toJSVal matrix]))
getElementById ::
(MonadDOM m, ToJSString elementId) =>
SVGSVGElement -> elementId -> m Element
getElementById self elementId
= liftDOM
((self ^. jsf "getElementById" [toJSVal elementId]) >>=
fromJSValUnchecked)
getElementById_ ::
(MonadDOM m, ToJSString elementId) =>
SVGSVGElement -> elementId -> m ()
getElementById_ self elementId
= liftDOM (void (self ^. jsf "getElementById" [toJSVal elementId]))
getX :: (MonadDOM m) => SVGSVGElement -> m SVGAnimatedLength
getX self = liftDOM ((self ^. js "x") >>= fromJSValUnchecked)
getY :: (MonadDOM m) => SVGSVGElement -> m SVGAnimatedLength
getY self = liftDOM ((self ^. js "y") >>= fromJSValUnchecked)
getWidth :: (MonadDOM m) => SVGSVGElement -> m SVGAnimatedLength
getWidth self
= liftDOM ((self ^. js "width") >>= fromJSValUnchecked)
getHeight :: (MonadDOM m) => SVGSVGElement -> m SVGAnimatedLength
getHeight self
= liftDOM ((self ^. js "height") >>= fromJSValUnchecked)
setContentScriptType ::
(MonadDOM m, ToJSString val) => SVGSVGElement -> val -> m ()
setContentScriptType self val
= liftDOM (self ^. jss "contentScriptType" (toJSVal val))
getContentScriptType ::
(MonadDOM m, FromJSString result) => SVGSVGElement -> m result
getContentScriptType self
= liftDOM ((self ^. js "contentScriptType") >>= fromJSValUnchecked)
setContentStyleType ::
(MonadDOM m, ToJSString val) => SVGSVGElement -> val -> m ()
setContentStyleType self val
= liftDOM (self ^. jss "contentStyleType" (toJSVal val))
getContentStyleType ::
(MonadDOM m, FromJSString result) => SVGSVGElement -> m result
getContentStyleType self
= liftDOM ((self ^. js "contentStyleType") >>= fromJSValUnchecked)
getViewport :: (MonadDOM m) => SVGSVGElement -> m SVGRect
getViewport self
= liftDOM ((self ^. js "viewport") >>= fromJSValUnchecked)
getPixelUnitToMillimeterX ::
(MonadDOM m) => SVGSVGElement -> m Float
getPixelUnitToMillimeterX self
= liftDOM
(realToFrac <$>
((self ^. js "pixelUnitToMillimeterX") >>= valToNumber))
getPixelUnitToMillimeterY ::
(MonadDOM m) => SVGSVGElement -> m Float
getPixelUnitToMillimeterY self
= liftDOM
(realToFrac <$>
((self ^. js "pixelUnitToMillimeterY") >>= valToNumber))
getScreenPixelToMillimeterX ::
(MonadDOM m) => SVGSVGElement -> m Float
getScreenPixelToMillimeterX self
= liftDOM
(realToFrac <$>
((self ^. js "screenPixelToMillimeterX") >>= valToNumber))
getScreenPixelToMillimeterY ::
(MonadDOM m) => SVGSVGElement -> m Float
getScreenPixelToMillimeterY self
= liftDOM
(realToFrac <$>
((self ^. js "screenPixelToMillimeterY") >>= valToNumber))
getUseCurrentView :: (MonadDOM m) => SVGSVGElement -> m Bool
getUseCurrentView self
= liftDOM ((self ^. js "useCurrentView") >>= valToBool)
getCurrentView :: (MonadDOM m) => SVGSVGElement -> m SVGViewSpec
getCurrentView self
= liftDOM ((self ^. js "currentView") >>= fromJSValUnchecked)
setCurrentScale :: (MonadDOM m) => SVGSVGElement -> Float -> m ()
setCurrentScale self val
= liftDOM (self ^. jss "currentScale" (toJSVal val))
getCurrentScale :: (MonadDOM m) => SVGSVGElement -> m Float
getCurrentScale self
= liftDOM
(realToFrac <$> ((self ^. js "currentScale") >>= valToNumber))
getCurrentTranslate :: (MonadDOM m) => SVGSVGElement -> m SVGPoint
getCurrentTranslate self
= liftDOM ((self ^. js "currentTranslate") >>= fromJSValUnchecked)