module JSDOM.Generated.SpeechSynthesis
(speak, cancel, pause, resume, getVoices, getVoices_, getPending,
getSpeaking, getPaused, SpeechSynthesis(..), gTypeSpeechSynthesis)
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
speak ::
(MonadDOM m) => SpeechSynthesis -> SpeechSynthesisUtterance -> m ()
speak self utterance
= liftDOM (void (self ^. jsf "speak" [toJSVal utterance]))
cancel :: (MonadDOM m) => SpeechSynthesis -> m ()
cancel self = liftDOM (void (self ^. jsf "cancel" ()))
pause :: (MonadDOM m) => SpeechSynthesis -> m ()
pause self = liftDOM (void (self ^. jsf "pause" ()))
resume :: (MonadDOM m) => SpeechSynthesis -> m ()
resume self = liftDOM (void (self ^. jsf "resume" ()))
getVoices ::
(MonadDOM m) => SpeechSynthesis -> m [SpeechSynthesisVoice]
getVoices self
= liftDOM ((self ^. jsf "getVoices" ()) >>= fromJSArrayUnchecked)
getVoices_ :: (MonadDOM m) => SpeechSynthesis -> m ()
getVoices_ self = liftDOM (void (self ^. jsf "getVoices" ()))
getPending :: (MonadDOM m) => SpeechSynthesis -> m Bool
getPending self = liftDOM ((self ^. js "pending") >>= valToBool)
getSpeaking :: (MonadDOM m) => SpeechSynthesis -> m Bool
getSpeaking self = liftDOM ((self ^. js "speaking") >>= valToBool)
getPaused :: (MonadDOM m) => SpeechSynthesis -> m Bool
getPaused self = liftDOM ((self ^. js "paused") >>= valToBool)