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 Language.Javascript.JSaddle (JSM(..), JSVal(..), JSString, strictEqual, toJSVal, valToStr, valToNumber, valToBool, js, jss, jsf, jsg, function, new, array)
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
#if MIN_VERSION_base(4,9,0)
import GHC.Stack (HasCallStack)
#elif MIN_VERSION_base(4,8,0)
import GHC.Stack (CallStack)
import GHC.Exts (Constraint)
type HasCallStack = ((?callStack :: CallStack) :: Constraint)
#else
import GHC.Exts (Constraint)
type HasCallStack = (() :: Constraint)
#endif
speak ::
(MonadDOM m) =>
SpeechSynthesis -> Maybe 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 [Maybe SpeechSynthesisVoice]
getVoices self
= liftDOM ((self ^. jsf "getVoices" ()) >>= fromJSArray)
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)