ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/GPUShaderModuleCompilationHint.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.GPUShaderModuleCompilationHint
(js_newGPUShaderModuleCompilationHint, js_setEntryPoint, js_getEntryPoint, js_setLayout, js_getLayout, newGPUShaderModuleCompilationHint, setEntryPoint, getEntryPoint, setLayout, getLayout, getLayoutUnsafe, getLayoutUnchecked, GPUShaderModuleCompilationHint(..), gTypeGPUShaderModuleCompilationHint)
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) => { return ({\"entryPoint\": $1}); })"
js_newGPUShaderModuleCompilationHint :: JSString -> IO GPUShaderModuleCompilationHint
-- | <https://gpuweb.github.io/gpuweb/#dictdef-gpushadermodulecompilationhint GPUShaderModuleCompilationHint specification>
newGPUShaderModuleCompilationHint :: (MonadDOM m, ToJSString entryPoint) => entryPoint -> m GPUShaderModuleCompilationHint
newGPUShaderModuleCompilationHint entryPoint = liftDOM ((js_newGPUShaderModuleCompilationHint (toJSString entryPoint)))
foreign import javascript safe "(($1, $2) => { $1[\"entryPoint\"] = $2; })"
js_setEntryPoint :: GPUShaderModuleCompilationHint -> JSString -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpushadermodulecompilationhint-entrypoint GPUShaderModuleCompilationHint.entryPoint specification>
setEntryPoint :: (MonadDOM m, ToJSString val) => GPUShaderModuleCompilationHint -> val -> m ()
setEntryPoint self val = liftDOM (void ((js_setEntryPoint (self) (toJSString val))))
foreign import javascript unsafe "(($1) => { return $1[\"entryPoint\"]; })"
js_getEntryPoint :: GPUShaderModuleCompilationHint -> IO JSString
-- | <https://gpuweb.github.io/gpuweb/#dom-gpushadermodulecompilationhint-entrypoint GPUShaderModuleCompilationHint.entryPoint specification>
getEntryPoint :: (MonadDOM m, FromJSString result) => GPUShaderModuleCompilationHint -> m result
getEntryPoint self = liftDOM ((fromJSString <$> (js_getEntryPoint (self))))
foreign import javascript safe "(($1, $2) => { $1[\"layout\"] = $2; })"
js_setLayout :: GPUShaderModuleCompilationHint -> GPUPipelineLayoutOrGPUAutoLayoutMode -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpushadermodulecompilationhint-layout GPUShaderModuleCompilationHint.layout specification>
setLayout :: (MonadDOM m, IsGPUPipelineLayoutOrGPUAutoLayoutMode val) => GPUShaderModuleCompilationHint -> val -> m ()
setLayout self val = liftDOM (void ((js_setLayout (self) (Types.toGPUPipelineLayoutOrGPUAutoLayoutMode val))))
foreign import javascript unsafe "(($1) => { return $1[\"layout\"]; })"
js_getLayout :: GPUShaderModuleCompilationHint -> IO JSVal
-- | <https://gpuweb.github.io/gpuweb/#dom-gpushadermodulecompilationhint-layout GPUShaderModuleCompilationHint.layout specification>
getLayout :: (MonadDOM m) => GPUShaderModuleCompilationHint -> m (Maybe GPUPipelineLayoutOrGPUAutoLayoutMode)
getLayout self = liftDOM (((js_getLayout (self)) >>= fromJSValUnchecked))
-- | <https://gpuweb.github.io/gpuweb/#dom-gpushadermodulecompilationhint-layout GPUShaderModuleCompilationHint.layout specification>
getLayoutUnsafe :: (MonadDOM m, HasCallStack) => GPUShaderModuleCompilationHint -> m GPUPipelineLayoutOrGPUAutoLayoutMode
getLayoutUnsafe self = liftDOM ((((js_getLayout (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))
-- | <https://gpuweb.github.io/gpuweb/#dom-gpushadermodulecompilationhint-layout GPUShaderModuleCompilationHint.layout specification>
getLayoutUnchecked :: (MonadDOM m) => GPUShaderModuleCompilationHint -> m GPUPipelineLayoutOrGPUAutoLayoutMode
getLayoutUnchecked self = liftDOM ((pFromJSVal <$> (js_getLayout (self))))