{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.SVGTextContentElement
(getNumberOfChars, getNumberOfChars_, getComputedTextLength,
getComputedTextLength_, getSubStringLength, getSubStringLength_,
getStartPositionOfChar, getStartPositionOfChar_,
getEndPositionOfChar, getEndPositionOfChar_, getExtentOfChar,
getExtentOfChar_, getRotationOfChar, getRotationOfChar_,
getCharNumAtPosition, getCharNumAtPosition_, selectSubString,
pattern LENGTHADJUST_UNKNOWN, pattern LENGTHADJUST_SPACING,
pattern LENGTHADJUST_SPACINGANDGLYPHS, getTextLength,
getLengthAdjust, SVGTextContentElement(..),
gTypeSVGTextContentElement, IsSVGTextContentElement,
toSVGTextContentElement)
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
getNumberOfChars ::
(MonadDOM m, IsSVGTextContentElement self) => self -> m Int
getNumberOfChars self
= liftDOM
(round <$>
(((toSVGTextContentElement self) ^. jsf "getNumberOfChars" ()) >>=
valToNumber))
getNumberOfChars_ ::
(MonadDOM m, IsSVGTextContentElement self) => self -> m ()
getNumberOfChars_ self
= liftDOM
(void
((toSVGTextContentElement self) ^. jsf "getNumberOfChars" ()))
getComputedTextLength ::
(MonadDOM m, IsSVGTextContentElement self) => self -> m Float
getComputedTextLength self
= liftDOM
(realToFrac <$>
(((toSVGTextContentElement self) ^. jsf "getComputedTextLength" ())
>>= valToNumber))
getComputedTextLength_ ::
(MonadDOM m, IsSVGTextContentElement self) => self -> m ()
getComputedTextLength_ self
= liftDOM
(void
((toSVGTextContentElement self) ^. jsf "getComputedTextLength" ()))
getSubStringLength ::
(MonadDOM m, IsSVGTextContentElement self) =>
self -> Maybe Word -> Maybe Word -> m Float
getSubStringLength self offset length
= liftDOM
(realToFrac <$>
(((toSVGTextContentElement self) ^. jsf "getSubStringLength"
[toJSVal offset, toJSVal length])
>>= valToNumber))
getSubStringLength_ ::
(MonadDOM m, IsSVGTextContentElement self) =>
self -> Maybe Word -> Maybe Word -> m ()
getSubStringLength_ self offset length
= liftDOM
(void
((toSVGTextContentElement self) ^. jsf "getSubStringLength"
[toJSVal offset, toJSVal length]))
getStartPositionOfChar ::
(MonadDOM m, IsSVGTextContentElement self) =>
self -> Maybe Word -> m SVGPoint
getStartPositionOfChar self offset
= liftDOM
(((toSVGTextContentElement self) ^. jsf "getStartPositionOfChar"
[toJSVal offset])
>>= fromJSValUnchecked)
getStartPositionOfChar_ ::
(MonadDOM m, IsSVGTextContentElement self) =>
self -> Maybe Word -> m ()
getStartPositionOfChar_ self offset
= liftDOM
(void
((toSVGTextContentElement self) ^. jsf "getStartPositionOfChar"
[toJSVal offset]))
getEndPositionOfChar ::
(MonadDOM m, IsSVGTextContentElement self) =>
self -> Maybe Word -> m SVGPoint
getEndPositionOfChar self offset
= liftDOM
(((toSVGTextContentElement self) ^. jsf "getEndPositionOfChar"
[toJSVal offset])
>>= fromJSValUnchecked)
getEndPositionOfChar_ ::
(MonadDOM m, IsSVGTextContentElement self) =>
self -> Maybe Word -> m ()
getEndPositionOfChar_ self offset
= liftDOM
(void
((toSVGTextContentElement self) ^. jsf "getEndPositionOfChar"
[toJSVal offset]))
getExtentOfChar ::
(MonadDOM m, IsSVGTextContentElement self) =>
self -> Maybe Word -> m SVGRect
getExtentOfChar self offset
= liftDOM
(((toSVGTextContentElement self) ^. jsf "getExtentOfChar"
[toJSVal offset])
>>= fromJSValUnchecked)
getExtentOfChar_ ::
(MonadDOM m, IsSVGTextContentElement self) =>
self -> Maybe Word -> m ()
getExtentOfChar_ self offset
= liftDOM
(void
((toSVGTextContentElement self) ^. jsf "getExtentOfChar"
[toJSVal offset]))
getRotationOfChar ::
(MonadDOM m, IsSVGTextContentElement self) =>
self -> Maybe Word -> m Float
getRotationOfChar self offset
= liftDOM
(realToFrac <$>
(((toSVGTextContentElement self) ^. jsf "getRotationOfChar"
[toJSVal offset])
>>= valToNumber))
getRotationOfChar_ ::
(MonadDOM m, IsSVGTextContentElement self) =>
self -> Maybe Word -> m ()
getRotationOfChar_ self offset
= liftDOM
(void
((toSVGTextContentElement self) ^. jsf "getRotationOfChar"
[toJSVal offset]))
getCharNumAtPosition ::
(MonadDOM m, IsSVGTextContentElement self) =>
self -> SVGPoint -> m Int
getCharNumAtPosition self point
= liftDOM
(round <$>
(((toSVGTextContentElement self) ^. jsf "getCharNumAtPosition"
[toJSVal point])
>>= valToNumber))
getCharNumAtPosition_ ::
(MonadDOM m, IsSVGTextContentElement self) =>
self -> SVGPoint -> m ()
getCharNumAtPosition_ self point
= liftDOM
(void
((toSVGTextContentElement self) ^. jsf "getCharNumAtPosition"
[toJSVal point]))
selectSubString ::
(MonadDOM m, IsSVGTextContentElement self) =>
self -> Maybe Word -> Maybe Word -> m ()
selectSubString self offset length
= liftDOM
(void
((toSVGTextContentElement self) ^. jsf "selectSubString"
[toJSVal offset, toJSVal length]))
pattern LENGTHADJUST_UNKNOWN = 0
pattern LENGTHADJUST_SPACING = 1
pattern LENGTHADJUST_SPACINGANDGLYPHS = 2
getTextLength ::
(MonadDOM m, IsSVGTextContentElement self) =>
self -> m SVGAnimatedLength
getTextLength self
= liftDOM
(((toSVGTextContentElement self) ^. js "textLength") >>=
fromJSValUnchecked)
getLengthAdjust ::
(MonadDOM m, IsSVGTextContentElement self) =>
self -> m SVGAnimatedEnumeration
getLengthAdjust self
= liftDOM
(((toSVGTextContentElement self) ^. js "lengthAdjust") >>=
fromJSValUnchecked)