{-# LANGUAGE PatternSynonyms #-}
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.SVGPathSegArcAbs
       (setX, getX, setY, getY, setR1, getR1, setR2, getR2, setAngle,
        getAngle, setLargeArcFlag, getLargeArcFlag, setSweepFlag,
        getSweepFlag, SVGPathSegArcAbs(..), gTypeSVGPathSegArcAbs)
       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, unsafeEventNameAsync)
import JSDOM.Enums

-- | <https://developer.mozilla.org/en-US/docs/Web/API/SVGPathSegArcAbs.x Mozilla SVGPathSegArcAbs.x documentation> 
setX :: (MonadDOM m) => SVGPathSegArcAbs -> Float -> m ()
setX :: forall (m :: * -> *).
MonadDOM m =>
SVGPathSegArcAbs -> Float -> m ()
setX SVGPathSegArcAbs
self Float
val = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (SVGPathSegArcAbs
self SVGPathSegArcAbs
-> Getting (DOM ()) SVGPathSegArcAbs (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"x" (Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
val))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/SVGPathSegArcAbs.x Mozilla SVGPathSegArcAbs.x documentation> 
getX :: (MonadDOM m) => SVGPathSegArcAbs -> m Float
getX :: forall (m :: * -> *). MonadDOM m => SVGPathSegArcAbs -> m Float
getX SVGPathSegArcAbs
self
  = DOM Float -> m Float
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (Double -> Float
forall a b. (Real a, Fractional b) => a -> b
realToFrac (Double -> Float) -> JSM Double -> DOM Float
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ((SVGPathSegArcAbs
self SVGPathSegArcAbs
-> Getting (JSM JSVal) SVGPathSegArcAbs (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> IndexPreservingGetter SVGPathSegArcAbs (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"x") JSM JSVal -> (JSVal -> JSM Double) -> JSM Double
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> JSM Double
forall value. ToJSVal value => value -> JSM Double
valToNumber))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/SVGPathSegArcAbs.y Mozilla SVGPathSegArcAbs.y documentation> 
setY :: (MonadDOM m) => SVGPathSegArcAbs -> Float -> m ()
setY :: forall (m :: * -> *).
MonadDOM m =>
SVGPathSegArcAbs -> Float -> m ()
setY SVGPathSegArcAbs
self Float
val = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (SVGPathSegArcAbs
self SVGPathSegArcAbs
-> Getting (DOM ()) SVGPathSegArcAbs (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"y" (Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
val))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/SVGPathSegArcAbs.y Mozilla SVGPathSegArcAbs.y documentation> 
getY :: (MonadDOM m) => SVGPathSegArcAbs -> m Float
getY :: forall (m :: * -> *). MonadDOM m => SVGPathSegArcAbs -> m Float
getY SVGPathSegArcAbs
self
  = DOM Float -> m Float
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (Double -> Float
forall a b. (Real a, Fractional b) => a -> b
realToFrac (Double -> Float) -> JSM Double -> DOM Float
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ((SVGPathSegArcAbs
self SVGPathSegArcAbs
-> Getting (JSM JSVal) SVGPathSegArcAbs (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> IndexPreservingGetter SVGPathSegArcAbs (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"y") JSM JSVal -> (JSVal -> JSM Double) -> JSM Double
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> JSM Double
forall value. ToJSVal value => value -> JSM Double
valToNumber))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/SVGPathSegArcAbs.r1 Mozilla SVGPathSegArcAbs.r1 documentation> 
setR1 :: (MonadDOM m) => SVGPathSegArcAbs -> Float -> m ()
setR1 :: forall (m :: * -> *).
MonadDOM m =>
SVGPathSegArcAbs -> Float -> m ()
setR1 SVGPathSegArcAbs
self Float
val = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (SVGPathSegArcAbs
self SVGPathSegArcAbs
-> Getting (DOM ()) SVGPathSegArcAbs (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"r1" (Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
val))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/SVGPathSegArcAbs.r1 Mozilla SVGPathSegArcAbs.r1 documentation> 
getR1 :: (MonadDOM m) => SVGPathSegArcAbs -> m Float
getR1 :: forall (m :: * -> *). MonadDOM m => SVGPathSegArcAbs -> m Float
getR1 SVGPathSegArcAbs
self
  = DOM Float -> m Float
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (Double -> Float
forall a b. (Real a, Fractional b) => a -> b
realToFrac (Double -> Float) -> JSM Double -> DOM Float
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ((SVGPathSegArcAbs
self SVGPathSegArcAbs
-> Getting (JSM JSVal) SVGPathSegArcAbs (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> IndexPreservingGetter SVGPathSegArcAbs (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"r1") JSM JSVal -> (JSVal -> JSM Double) -> JSM Double
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> JSM Double
forall value. ToJSVal value => value -> JSM Double
valToNumber))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/SVGPathSegArcAbs.r2 Mozilla SVGPathSegArcAbs.r2 documentation> 
setR2 :: (MonadDOM m) => SVGPathSegArcAbs -> Float -> m ()
setR2 :: forall (m :: * -> *).
MonadDOM m =>
SVGPathSegArcAbs -> Float -> m ()
setR2 SVGPathSegArcAbs
self Float
val = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (SVGPathSegArcAbs
self SVGPathSegArcAbs
-> Getting (DOM ()) SVGPathSegArcAbs (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"r2" (Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
val))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/SVGPathSegArcAbs.r2 Mozilla SVGPathSegArcAbs.r2 documentation> 
getR2 :: (MonadDOM m) => SVGPathSegArcAbs -> m Float
getR2 :: forall (m :: * -> *). MonadDOM m => SVGPathSegArcAbs -> m Float
getR2 SVGPathSegArcAbs
self
  = DOM Float -> m Float
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (Double -> Float
forall a b. (Real a, Fractional b) => a -> b
realToFrac (Double -> Float) -> JSM Double -> DOM Float
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ((SVGPathSegArcAbs
self SVGPathSegArcAbs
-> Getting (JSM JSVal) SVGPathSegArcAbs (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> IndexPreservingGetter SVGPathSegArcAbs (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"r2") JSM JSVal -> (JSVal -> JSM Double) -> JSM Double
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> JSM Double
forall value. ToJSVal value => value -> JSM Double
valToNumber))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/SVGPathSegArcAbs.angle Mozilla SVGPathSegArcAbs.angle documentation> 
setAngle :: (MonadDOM m) => SVGPathSegArcAbs -> Float -> m ()
setAngle :: forall (m :: * -> *).
MonadDOM m =>
SVGPathSegArcAbs -> Float -> m ()
setAngle SVGPathSegArcAbs
self Float
val = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (SVGPathSegArcAbs
self SVGPathSegArcAbs
-> Getting (DOM ()) SVGPathSegArcAbs (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"angle" (Float -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Float
val))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/SVGPathSegArcAbs.angle Mozilla SVGPathSegArcAbs.angle documentation> 
getAngle :: (MonadDOM m) => SVGPathSegArcAbs -> m Float
getAngle :: forall (m :: * -> *). MonadDOM m => SVGPathSegArcAbs -> m Float
getAngle SVGPathSegArcAbs
self
  = DOM Float -> m Float
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (Double -> Float
forall a b. (Real a, Fractional b) => a -> b
realToFrac (Double -> Float) -> JSM Double -> DOM Float
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ((SVGPathSegArcAbs
self SVGPathSegArcAbs
-> Getting (JSM JSVal) SVGPathSegArcAbs (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> IndexPreservingGetter SVGPathSegArcAbs (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"angle") JSM JSVal -> (JSVal -> JSM Double) -> JSM Double
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> JSM Double
forall value. ToJSVal value => value -> JSM Double
valToNumber))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/SVGPathSegArcAbs.largeArcFlag Mozilla SVGPathSegArcAbs.largeArcFlag documentation> 
setLargeArcFlag :: (MonadDOM m) => SVGPathSegArcAbs -> Bool -> m ()
setLargeArcFlag :: forall (m :: * -> *).
MonadDOM m =>
SVGPathSegArcAbs -> Bool -> m ()
setLargeArcFlag SVGPathSegArcAbs
self Bool
val
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (SVGPathSegArcAbs
self SVGPathSegArcAbs
-> Getting (DOM ()) SVGPathSegArcAbs (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"largeArcFlag" (Bool -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Bool
val))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/SVGPathSegArcAbs.largeArcFlag Mozilla SVGPathSegArcAbs.largeArcFlag documentation> 
getLargeArcFlag :: (MonadDOM m) => SVGPathSegArcAbs -> m Bool
getLargeArcFlag :: forall (m :: * -> *). MonadDOM m => SVGPathSegArcAbs -> m Bool
getLargeArcFlag SVGPathSegArcAbs
self
  = DOM Bool -> m Bool
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((SVGPathSegArcAbs
self SVGPathSegArcAbs
-> Getting (JSM JSVal) SVGPathSegArcAbs (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> IndexPreservingGetter SVGPathSegArcAbs (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"largeArcFlag") JSM JSVal -> (JSVal -> DOM Bool) -> DOM Bool
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM Bool
forall value. ToJSVal value => value -> DOM Bool
valToBool)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/SVGPathSegArcAbs.sweepFlag Mozilla SVGPathSegArcAbs.sweepFlag documentation> 
setSweepFlag :: (MonadDOM m) => SVGPathSegArcAbs -> Bool -> m ()
setSweepFlag :: forall (m :: * -> *).
MonadDOM m =>
SVGPathSegArcAbs -> Bool -> m ()
setSweepFlag SVGPathSegArcAbs
self Bool
val
  = DOM () -> m ()
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM (SVGPathSegArcAbs
self SVGPathSegArcAbs
-> Getting (DOM ()) SVGPathSegArcAbs (DOM ()) -> DOM ()
forall s a. s -> Getting a s a -> a
^. String
-> JSM JSVal
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
forall name val.
(ToJSString name, ToJSVal val) =>
name
-> val
-> forall o. MakeObject o => IndexPreservingGetter o (DOM ())
jss String
"sweepFlag" (Bool -> JSM JSVal
forall a. ToJSVal a => a -> JSM JSVal
toJSVal Bool
val))

-- | <https://developer.mozilla.org/en-US/docs/Web/API/SVGPathSegArcAbs.sweepFlag Mozilla SVGPathSegArcAbs.sweepFlag documentation> 
getSweepFlag :: (MonadDOM m) => SVGPathSegArcAbs -> m Bool
getSweepFlag :: forall (m :: * -> *). MonadDOM m => SVGPathSegArcAbs -> m Bool
getSweepFlag SVGPathSegArcAbs
self
  = DOM Bool -> m Bool
forall (m :: * -> *) a. MonadDOM m => DOM a -> m a
liftDOM ((SVGPathSegArcAbs
self SVGPathSegArcAbs
-> Getting (JSM JSVal) SVGPathSegArcAbs (JSM JSVal) -> JSM JSVal
forall s a. s -> Getting a s a -> a
^. String -> IndexPreservingGetter SVGPathSegArcAbs (JSM JSVal)
forall s name.
(MakeObject s, ToJSString name) =>
name -> IndexPreservingGetter s (JSM JSVal)
js String
"sweepFlag") JSM JSVal -> (JSVal -> DOM Bool) -> DOM Bool
forall a b. JSM a -> (a -> JSM b) -> JSM b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= JSVal -> DOM Bool
forall value. ToJSVal value => value -> DOM Bool
valToBool)