ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/GPUBlendState.hs
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from webgpu (webref). Do not edit.
module GHCJS.DOM.JSFFI.Generated.GPUBlendState
(js_newGPUBlendState, js_setColor, js_getColor, js_setAlpha, js_getAlpha, newGPUBlendState, setColor, getColor, setAlpha, getAlpha, GPUBlendState(..), gTypeGPUBlendState)
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 ({\"color\": $1, \"alpha\": $2}); })"
js_newGPUBlendState :: GPUBlendComponent -> GPUBlendComponent -> IO GPUBlendState
-- | <https://gpuweb.github.io/gpuweb/#dictdef-gpublendstate GPUBlendState specification>
newGPUBlendState :: (MonadDOM m) => GPUBlendComponent -> GPUBlendComponent -> m GPUBlendState
newGPUBlendState color alpha = liftDOM ((js_newGPUBlendState (color) (alpha)))
foreign import javascript safe "(($1, $2) => { $1[\"color\"] = $2; })"
js_setColor :: GPUBlendState -> GPUBlendComponent -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpublendstate-color GPUBlendState.color specification>
setColor :: (MonadDOM m) => GPUBlendState -> GPUBlendComponent -> m ()
setColor self val = liftDOM (void ((js_setColor (self) (val))))
foreign import javascript unsafe "(($1) => { return $1[\"color\"]; })"
js_getColor :: GPUBlendState -> IO GPUBlendComponent
-- | <https://gpuweb.github.io/gpuweb/#dom-gpublendstate-color GPUBlendState.color specification>
getColor :: (MonadDOM m) => GPUBlendState -> m GPUBlendComponent
getColor self = liftDOM ((js_getColor (self)))
foreign import javascript safe "(($1, $2) => { $1[\"alpha\"] = $2; })"
js_setAlpha :: GPUBlendState -> GPUBlendComponent -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpublendstate-alpha GPUBlendState.alpha specification>
setAlpha :: (MonadDOM m) => GPUBlendState -> GPUBlendComponent -> m ()
setAlpha self val = liftDOM (void ((js_setAlpha (self) (val))))
foreign import javascript unsafe "(($1) => { return $1[\"alpha\"]; })"
js_getAlpha :: GPUBlendState -> IO GPUBlendComponent
-- | <https://gpuweb.github.io/gpuweb/#dom-gpublendstate-alpha GPUBlendState.alpha specification>
getAlpha :: (MonadDOM m) => GPUBlendState -> m GPUBlendComponent
getAlpha self = liftDOM ((js_getAlpha (self)))