jsaddle-dom-0.10.0.0: src/JSDOM/Generated/GPUPipelineDescriptorBase.hs
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from webgpu (webref). Do not edit.
module JSDOM.Generated.GPUPipelineDescriptorBase
(newGPUPipelineDescriptorBase, setLayout, getLayout, GPUPipelineDescriptorBase(..), gTypeGPUPipelineDescriptorBase, IsGPUPipelineDescriptorBase, toGPUPipelineDescriptorBase)
where
import Prelude ((.), (==), (>>=), (<$>), (++), Bool(..), Maybe(..), IO, Int, Word, Double, Float)
import qualified Prelude as P
import Control.Monad (void)
import Control.Lens.Operators ((^.))
import Language.Javascript.JSaddle (JSM, JSVal, JSString, toJSVal, valToBool, valToNumber, js, jss, jsf, jsg, new, function, asyncFunction, jsUndefined, jsNull)
import JSDOM.Types
import qualified JSDOM.Types as Types
import JSDOM.EventTargetClosures (EventName, unsafeEventName, unsafeEventNameAsync)
import JSDOM.Generated.Enums
-- | <https://gpuweb.github.io/gpuweb/#dictdef-gpupipelinedescriptorbase GPUPipelineDescriptorBase specification>
newGPUPipelineDescriptorBase :: (MonadDOM m, IsGPUPipelineLayoutOrGPUAutoLayoutMode layout) => layout -> m GPUPipelineDescriptorBase
newGPUPipelineDescriptorBase layout = liftDOM ((((new (jsg "Object") () >>= \o -> (o ^. jss "layout" (toJSVal layout)) P.>> P.return o)) >>= fromJSValUnchecked))
-- | <https://gpuweb.github.io/gpuweb/#dom-gpupipelinedescriptorbase-layout GPUPipelineDescriptorBase.layout specification>
setLayout :: (MonadDOM m, IsGPUPipelineDescriptorBase self, IsGPUPipelineLayoutOrGPUAutoLayoutMode val) => self -> val -> m ()
setLayout self val = liftDOM (void ((Types.toGPUPipelineDescriptorBase self) ^. jss "layout" (toJSVal val)))
-- | <https://gpuweb.github.io/gpuweb/#dom-gpupipelinedescriptorbase-layout GPUPipelineDescriptorBase.layout specification>
getLayout :: (MonadDOM m, IsGPUPipelineDescriptorBase self) => self -> m GPUPipelineLayoutOrGPUAutoLayoutMode
getLayout self = liftDOM ((((Types.toGPUPipelineDescriptorBase self) ^. js "layout") >>= fromJSValUnchecked))