ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/CSSMatrixComponent.hs
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from css-typed-om-1 (webref). Do not edit.
module GHCJS.DOM.JSFFI.Generated.CSSMatrixComponent
(js_newCSSMatrixComponent, js_setMatrix, js_getMatrix, newCSSMatrixComponent, setMatrix, getMatrix, CSSMatrixComponent(..), gTypeCSSMatrixComponent)
where
import Prelude ((.), (==), (>>=), (<$>), (++), Bool(..), Maybe(..), IO, Int, Word, Double, Float)
import qualified Prelude as P
import Control.Monad (void)
import GHCJS.Types (JSVal, JSString)
import GHCJS.Foreign (jsUndefined, jsNull)
import GHCJS.DOM.Types
import qualified GHCJS.DOM.Types as Types
import GHCJS.DOM.EventTargetClosures (EventName, unsafeEventName, unsafeEventNameAsync)
import GHCJS.DOM.JSFFI.Generated.Enums
foreign import javascript safe "(($1, $2) => { return new globalThis[\"CSSMatrixComponent\"]($1, $2); })"
js_newCSSMatrixComponent :: DOMMatrixReadOnly -> JSVal -> IO CSSMatrixComponent
-- | <https://developer.mozilla.org/docs/Web/API/CSSMatrixComponent/CSSMatrixComponent MDN CSSMatrixComponent. documentation>
newCSSMatrixComponent :: (MonadDOM m, IsDOMMatrixReadOnly matrix) => matrix -> Maybe CSSMatrixComponentOptions -> m CSSMatrixComponent
newCSSMatrixComponent matrix options = liftDOM (((P.maybe (P.return jsUndefined) toJSVal options) >>= \a2' -> js_newCSSMatrixComponent (Types.toDOMMatrixReadOnly matrix) a2'))
foreign import javascript safe "(($1, $2) => { $1[\"matrix\"] = $2; })"
js_setMatrix :: CSSMatrixComponent -> DOMMatrix -> IO ()
-- | <https://developer.mozilla.org/docs/Web/API/CSSMatrixComponent/matrix MDN CSSMatrixComponent.matrix documentation>
setMatrix :: (MonadDOM m) => CSSMatrixComponent -> DOMMatrix -> m ()
setMatrix self val = liftDOM (void ((js_setMatrix (self) (val))))
foreign import javascript unsafe "(($1) => { return $1[\"matrix\"]; })"
js_getMatrix :: CSSMatrixComponent -> IO DOMMatrix
-- | <https://developer.mozilla.org/docs/Web/API/CSSMatrixComponent/matrix MDN CSSMatrixComponent.matrix documentation>
getMatrix :: (MonadDOM m) => CSSMatrixComponent -> m DOMMatrix
getMatrix self = liftDOM ((js_getMatrix (self)))