module JSDOM.Generated.VTTCue
(newVTTCue, getCueAsHTML, getCueAsHTML_, setVertical, getVertical,
setSnapToLines, getSnapToLines, setLine, getLine, setPosition,
getPosition, setSize, getSize, setAlign, getAlign, setText,
getText, setRegionId, getRegionId, VTTCue(..), gTypeVTTCue)
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
newVTTCue ::
(MonadDOM m, ToJSString text) =>
Double -> Double -> text -> m VTTCue
newVTTCue startTime endTime text
= liftDOM
(VTTCue <$>
new (jsg "VTTCue")
[toJSVal startTime, toJSVal endTime, toJSVal text])
getCueAsHTML :: (MonadDOM m) => VTTCue -> m DocumentFragment
getCueAsHTML self
= liftDOM ((self ^. jsf "getCueAsHTML" ()) >>= fromJSValUnchecked)
getCueAsHTML_ :: (MonadDOM m) => VTTCue -> m ()
getCueAsHTML_ self = liftDOM (void (self ^. jsf "getCueAsHTML" ()))
setVertical ::
(MonadDOM m, ToJSString val) => VTTCue -> val -> m ()
setVertical self val
= liftDOM (self ^. jss "vertical" (toJSVal val))
getVertical ::
(MonadDOM m, FromJSString result) => VTTCue -> m result
getVertical self
= liftDOM ((self ^. js "vertical") >>= fromJSValUnchecked)
setSnapToLines :: (MonadDOM m) => VTTCue -> Bool -> m ()
setSnapToLines self val
= liftDOM (self ^. jss "snapToLines" (toJSVal val))
getSnapToLines :: (MonadDOM m) => VTTCue -> m Bool
getSnapToLines self
= liftDOM ((self ^. js "snapToLines") >>= valToBool)
setLine :: (MonadDOM m) => VTTCue -> Double -> m ()
setLine self val = liftDOM (self ^. jss "line" (toJSVal val))
getLine :: (MonadDOM m) => VTTCue -> m Double
getLine self = liftDOM ((self ^. js "line") >>= valToNumber)
setPosition :: (MonadDOM m) => VTTCue -> Double -> m ()
setPosition self val
= liftDOM (self ^. jss "position" (toJSVal val))
getPosition :: (MonadDOM m) => VTTCue -> m Double
getPosition self
= liftDOM ((self ^. js "position") >>= valToNumber)
setSize :: (MonadDOM m) => VTTCue -> Double -> m ()
setSize self val = liftDOM (self ^. jss "size" (toJSVal val))
getSize :: (MonadDOM m) => VTTCue -> m Double
getSize self = liftDOM ((self ^. js "size") >>= valToNumber)
setAlign :: (MonadDOM m, ToJSString val) => VTTCue -> val -> m ()
setAlign self val = liftDOM (self ^. jss "align" (toJSVal val))
getAlign :: (MonadDOM m, FromJSString result) => VTTCue -> m result
getAlign self
= liftDOM ((self ^. js "align") >>= fromJSValUnchecked)
setText :: (MonadDOM m, ToJSString val) => VTTCue -> val -> m ()
setText self val = liftDOM (self ^. jss "text" (toJSVal val))
getText :: (MonadDOM m, FromJSString result) => VTTCue -> m result
getText self = liftDOM ((self ^. js "text") >>= fromJSValUnchecked)
setRegionId ::
(MonadDOM m, ToJSString val) => VTTCue -> val -> m ()
setRegionId self val
= liftDOM (self ^. jss "regionId" (toJSVal val))
getRegionId ::
(MonadDOM m, FromJSString result) => VTTCue -> m result
getRegionId self
= liftDOM ((self ^. js "regionId") >>= fromJSValUnchecked)