packages feed

jsaddle-dom-0.10.0.0: src/JSDOM/Generated/GPURenderPassDepthStencilAttachment.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.GPURenderPassDepthStencilAttachment
       (newGPURenderPassDepthStencilAttachment, setView, getView, setDepthClearValue, getDepthClearValue, getDepthClearValueUnsafe, getDepthClearValueUnchecked, setDepthLoadOp, getDepthLoadOp, getDepthLoadOpUnsafe, getDepthLoadOpUnchecked, setDepthStoreOp, getDepthStoreOp, getDepthStoreOpUnsafe, getDepthStoreOpUnchecked, setDepthReadOnly, getDepthReadOnly, getDepthReadOnlyUnsafe, getDepthReadOnlyUnchecked, setStencilClearValue, getStencilClearValue, getStencilClearValueUnsafe, getStencilClearValueUnchecked, setStencilLoadOp, getStencilLoadOp, getStencilLoadOpUnsafe, getStencilLoadOpUnchecked, setStencilStoreOp, getStencilStoreOp, getStencilStoreOpUnsafe, getStencilStoreOpUnchecked, setStencilReadOnly, getStencilReadOnly, getStencilReadOnlyUnsafe, getStencilReadOnlyUnchecked, GPURenderPassDepthStencilAttachment(..), gTypeGPURenderPassDepthStencilAttachment)
       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-gpurenderpassdepthstencilattachment GPURenderPassDepthStencilAttachment specification>
newGPURenderPassDepthStencilAttachment :: (MonadDOM m, IsGPUTextureOrGPUTextureView view) => view -> m GPURenderPassDepthStencilAttachment
newGPURenderPassDepthStencilAttachment view = liftDOM ((((new (jsg "Object") () >>= \o -> (o ^. jss "view" (toJSVal view)) P.>> P.return o)) >>= fromJSValUnchecked))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-view GPURenderPassDepthStencilAttachment.view specification>
setView :: (MonadDOM m, IsGPUTextureOrGPUTextureView val) => GPURenderPassDepthStencilAttachment -> val -> m ()
setView self val = liftDOM (void (self ^. jss "view" (toJSVal val)))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-view GPURenderPassDepthStencilAttachment.view specification>
getView :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> m GPUTextureOrGPUTextureView
getView self = liftDOM (((self ^. js "view") >>= fromJSValUnchecked))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-depthclearvalue GPURenderPassDepthStencilAttachment.depthClearValue specification>
setDepthClearValue :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> Float -> m ()
setDepthClearValue self val = liftDOM (void (self ^. jss "depthClearValue" (toJSVal val)))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-depthclearvalue GPURenderPassDepthStencilAttachment.depthClearValue specification>
getDepthClearValue :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> m (Maybe Float)
getDepthClearValue self = liftDOM (((self ^. js "depthClearValue") >>= fromJSValUnchecked))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-depthclearvalue GPURenderPassDepthStencilAttachment.depthClearValue specification>
getDepthClearValueUnsafe :: (MonadDOM m, HasCallStack) => GPURenderPassDepthStencilAttachment -> m Float
getDepthClearValueUnsafe self = liftDOM ((((self ^. js "depthClearValue") >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-depthclearvalue GPURenderPassDepthStencilAttachment.depthClearValue specification>
getDepthClearValueUnchecked :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> m Float
getDepthClearValueUnchecked self = liftDOM ((P.realToFrac <$> ((self ^. js "depthClearValue") >>= valToNumber)))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-depthloadop GPURenderPassDepthStencilAttachment.depthLoadOp specification>
setDepthLoadOp :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> GPULoadOp -> m ()
setDepthLoadOp self val = liftDOM (void (self ^. jss "depthLoadOp" (toJSVal val)))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-depthloadop GPURenderPassDepthStencilAttachment.depthLoadOp specification>
getDepthLoadOp :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> m (Maybe GPULoadOp)
getDepthLoadOp self = liftDOM (((self ^. js "depthLoadOp") >>= fromJSValUnchecked))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-depthloadop GPURenderPassDepthStencilAttachment.depthLoadOp specification>
getDepthLoadOpUnsafe :: (MonadDOM m, HasCallStack) => GPURenderPassDepthStencilAttachment -> m GPULoadOp
getDepthLoadOpUnsafe self = liftDOM ((((self ^. js "depthLoadOp") >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-depthloadop GPURenderPassDepthStencilAttachment.depthLoadOp specification>
getDepthLoadOpUnchecked :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> m GPULoadOp
getDepthLoadOpUnchecked self = liftDOM (((self ^. js "depthLoadOp") >>= fromJSValUnchecked))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-depthstoreop GPURenderPassDepthStencilAttachment.depthStoreOp specification>
setDepthStoreOp :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> GPUStoreOp -> m ()
setDepthStoreOp self val = liftDOM (void (self ^. jss "depthStoreOp" (toJSVal val)))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-depthstoreop GPURenderPassDepthStencilAttachment.depthStoreOp specification>
getDepthStoreOp :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> m (Maybe GPUStoreOp)
getDepthStoreOp self = liftDOM (((self ^. js "depthStoreOp") >>= fromJSValUnchecked))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-depthstoreop GPURenderPassDepthStencilAttachment.depthStoreOp specification>
getDepthStoreOpUnsafe :: (MonadDOM m, HasCallStack) => GPURenderPassDepthStencilAttachment -> m GPUStoreOp
getDepthStoreOpUnsafe self = liftDOM ((((self ^. js "depthStoreOp") >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-depthstoreop GPURenderPassDepthStencilAttachment.depthStoreOp specification>
getDepthStoreOpUnchecked :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> m GPUStoreOp
getDepthStoreOpUnchecked self = liftDOM (((self ^. js "depthStoreOp") >>= fromJSValUnchecked))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-depthreadonly GPURenderPassDepthStencilAttachment.depthReadOnly specification>
setDepthReadOnly :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> Bool -> m ()
setDepthReadOnly self val = liftDOM (void (self ^. jss "depthReadOnly" (toJSVal val)))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-depthreadonly GPURenderPassDepthStencilAttachment.depthReadOnly specification>
getDepthReadOnly :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> m (Maybe Bool)
getDepthReadOnly self = liftDOM (((self ^. js "depthReadOnly") >>= fromJSValUnchecked))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-depthreadonly GPURenderPassDepthStencilAttachment.depthReadOnly specification>
getDepthReadOnlyUnsafe :: (MonadDOM m, HasCallStack) => GPURenderPassDepthStencilAttachment -> m Bool
getDepthReadOnlyUnsafe self = liftDOM ((((self ^. js "depthReadOnly") >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-depthreadonly GPURenderPassDepthStencilAttachment.depthReadOnly specification>
getDepthReadOnlyUnchecked :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> m Bool
getDepthReadOnlyUnchecked self = liftDOM (((self ^. js "depthReadOnly") >>= valToBool))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-stencilclearvalue GPURenderPassDepthStencilAttachment.stencilClearValue specification>
setStencilClearValue :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> Word -> m ()
setStencilClearValue self val = liftDOM (void (self ^. jss "stencilClearValue" (toJSVal val)))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-stencilclearvalue GPURenderPassDepthStencilAttachment.stencilClearValue specification>
getStencilClearValue :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> m (Maybe Word)
getStencilClearValue self = liftDOM (((self ^. js "stencilClearValue") >>= fromJSValUnchecked))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-stencilclearvalue GPURenderPassDepthStencilAttachment.stencilClearValue specification>
getStencilClearValueUnsafe :: (MonadDOM m, HasCallStack) => GPURenderPassDepthStencilAttachment -> m Word
getStencilClearValueUnsafe self = liftDOM ((((self ^. js "stencilClearValue") >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-stencilclearvalue GPURenderPassDepthStencilAttachment.stencilClearValue specification>
getStencilClearValueUnchecked :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> m Word
getStencilClearValueUnchecked self = liftDOM ((P.round <$> ((self ^. js "stencilClearValue") >>= valToNumber)))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-stencilloadop GPURenderPassDepthStencilAttachment.stencilLoadOp specification>
setStencilLoadOp :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> GPULoadOp -> m ()
setStencilLoadOp self val = liftDOM (void (self ^. jss "stencilLoadOp" (toJSVal val)))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-stencilloadop GPURenderPassDepthStencilAttachment.stencilLoadOp specification>
getStencilLoadOp :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> m (Maybe GPULoadOp)
getStencilLoadOp self = liftDOM (((self ^. js "stencilLoadOp") >>= fromJSValUnchecked))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-stencilloadop GPURenderPassDepthStencilAttachment.stencilLoadOp specification>
getStencilLoadOpUnsafe :: (MonadDOM m, HasCallStack) => GPURenderPassDepthStencilAttachment -> m GPULoadOp
getStencilLoadOpUnsafe self = liftDOM ((((self ^. js "stencilLoadOp") >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-stencilloadop GPURenderPassDepthStencilAttachment.stencilLoadOp specification>
getStencilLoadOpUnchecked :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> m GPULoadOp
getStencilLoadOpUnchecked self = liftDOM (((self ^. js "stencilLoadOp") >>= fromJSValUnchecked))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-stencilstoreop GPURenderPassDepthStencilAttachment.stencilStoreOp specification>
setStencilStoreOp :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> GPUStoreOp -> m ()
setStencilStoreOp self val = liftDOM (void (self ^. jss "stencilStoreOp" (toJSVal val)))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-stencilstoreop GPURenderPassDepthStencilAttachment.stencilStoreOp specification>
getStencilStoreOp :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> m (Maybe GPUStoreOp)
getStencilStoreOp self = liftDOM (((self ^. js "stencilStoreOp") >>= fromJSValUnchecked))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-stencilstoreop GPURenderPassDepthStencilAttachment.stencilStoreOp specification>
getStencilStoreOpUnsafe :: (MonadDOM m, HasCallStack) => GPURenderPassDepthStencilAttachment -> m GPUStoreOp
getStencilStoreOpUnsafe self = liftDOM ((((self ^. js "stencilStoreOp") >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-stencilstoreop GPURenderPassDepthStencilAttachment.stencilStoreOp specification>
getStencilStoreOpUnchecked :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> m GPUStoreOp
getStencilStoreOpUnchecked self = liftDOM (((self ^. js "stencilStoreOp") >>= fromJSValUnchecked))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-stencilreadonly GPURenderPassDepthStencilAttachment.stencilReadOnly specification>
setStencilReadOnly :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> Bool -> m ()
setStencilReadOnly self val = liftDOM (void (self ^. jss "stencilReadOnly" (toJSVal val)))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-stencilreadonly GPURenderPassDepthStencilAttachment.stencilReadOnly specification>
getStencilReadOnly :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> m (Maybe Bool)
getStencilReadOnly self = liftDOM (((self ^. js "stencilReadOnly") >>= fromJSValUnchecked))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-stencilreadonly GPURenderPassDepthStencilAttachment.stencilReadOnly specification>
getStencilReadOnlyUnsafe :: (MonadDOM m, HasCallStack) => GPURenderPassDepthStencilAttachment -> m Bool
getStencilReadOnlyUnsafe self = liftDOM ((((self ^. js "stencilReadOnly") >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-stencilreadonly GPURenderPassDepthStencilAttachment.stencilReadOnly specification>
getStencilReadOnlyUnchecked :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> m Bool
getStencilReadOnlyUnchecked self = liftDOM (((self ^. js "stencilReadOnly") >>= valToBool))