ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/GPURenderPassDepthStencilAttachment.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.GPURenderPassDepthStencilAttachment
(js_newGPURenderPassDepthStencilAttachment, js_setView, js_getView, js_setDepthClearValue, js_getDepthClearValue, js_setDepthLoadOp, js_getDepthLoadOp, js_setDepthStoreOp, js_getDepthStoreOp, js_setDepthReadOnly, js_getDepthReadOnly, js_setStencilClearValue, js_getStencilClearValue, js_setStencilLoadOp, js_getStencilLoadOp, js_setStencilStoreOp, js_getStencilStoreOp, js_setStencilReadOnly, js_getStencilReadOnly, 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 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 ({\"view\": $1}); })"
js_newGPURenderPassDepthStencilAttachment :: GPUTextureOrGPUTextureView -> IO GPURenderPassDepthStencilAttachment
-- | <https://gpuweb.github.io/gpuweb/#dictdef-gpurenderpassdepthstencilattachment GPURenderPassDepthStencilAttachment specification>
newGPURenderPassDepthStencilAttachment :: (MonadDOM m, IsGPUTextureOrGPUTextureView view) => view -> m GPURenderPassDepthStencilAttachment
newGPURenderPassDepthStencilAttachment view = liftDOM ((js_newGPURenderPassDepthStencilAttachment (Types.toGPUTextureOrGPUTextureView view)))
foreign import javascript safe "(($1, $2) => { $1[\"view\"] = $2; })"
js_setView :: GPURenderPassDepthStencilAttachment -> GPUTextureOrGPUTextureView -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-view GPURenderPassDepthStencilAttachment.view specification>
setView :: (MonadDOM m, IsGPUTextureOrGPUTextureView val) => GPURenderPassDepthStencilAttachment -> val -> m ()
setView self val = liftDOM (void ((js_setView (self) (Types.toGPUTextureOrGPUTextureView val))))
foreign import javascript unsafe "(($1) => { return $1[\"view\"]; })"
js_getView :: GPURenderPassDepthStencilAttachment -> IO GPUTextureOrGPUTextureView
-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-view GPURenderPassDepthStencilAttachment.view specification>
getView :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> m GPUTextureOrGPUTextureView
getView self = liftDOM ((js_getView (self)))
foreign import javascript safe "(($1, $2) => { $1[\"depthClearValue\"] = $2; })"
js_setDepthClearValue :: GPURenderPassDepthStencilAttachment -> Float -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-depthclearvalue GPURenderPassDepthStencilAttachment.depthClearValue specification>
setDepthClearValue :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> Float -> m ()
setDepthClearValue self val = liftDOM (void ((js_setDepthClearValue (self) (val))))
foreign import javascript unsafe "(($1) => { return $1[\"depthClearValue\"]; })"
js_getDepthClearValue :: GPURenderPassDepthStencilAttachment -> IO JSVal
-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-depthclearvalue GPURenderPassDepthStencilAttachment.depthClearValue specification>
getDepthClearValue :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> m (Maybe Float)
getDepthClearValue self = liftDOM (((js_getDepthClearValue (self)) >>= fromJSValUnchecked))
-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-depthclearvalue GPURenderPassDepthStencilAttachment.depthClearValue specification>
getDepthClearValueUnsafe :: (MonadDOM m, HasCallStack) => GPURenderPassDepthStencilAttachment -> m Float
getDepthClearValueUnsafe self = liftDOM ((((js_getDepthClearValue (self)) >>= 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 ((pFromJSVal <$> (js_getDepthClearValue (self))))
foreign import javascript safe "(($1, $2) => { $1[\"depthLoadOp\"] = $2; })"
js_setDepthLoadOp :: GPURenderPassDepthStencilAttachment -> JSVal -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-depthloadop GPURenderPassDepthStencilAttachment.depthLoadOp specification>
setDepthLoadOp :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> GPULoadOp -> m ()
setDepthLoadOp self val = liftDOM (void (((toJSVal val) >>= \a2' -> js_setDepthLoadOp (self) a2')))
foreign import javascript unsafe "(($1) => { return $1[\"depthLoadOp\"]; })"
js_getDepthLoadOp :: GPURenderPassDepthStencilAttachment -> IO JSVal
-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-depthloadop GPURenderPassDepthStencilAttachment.depthLoadOp specification>
getDepthLoadOp :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> m (Maybe GPULoadOp)
getDepthLoadOp self = liftDOM (((js_getDepthLoadOp (self)) >>= fromJSValUnchecked))
-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-depthloadop GPURenderPassDepthStencilAttachment.depthLoadOp specification>
getDepthLoadOpUnsafe :: (MonadDOM m, HasCallStack) => GPURenderPassDepthStencilAttachment -> m GPULoadOp
getDepthLoadOpUnsafe self = liftDOM ((((js_getDepthLoadOp (self)) >>= 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 ((pFromJSVal <$> (js_getDepthLoadOp (self))))
foreign import javascript safe "(($1, $2) => { $1[\"depthStoreOp\"] = $2; })"
js_setDepthStoreOp :: GPURenderPassDepthStencilAttachment -> JSVal -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-depthstoreop GPURenderPassDepthStencilAttachment.depthStoreOp specification>
setDepthStoreOp :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> GPUStoreOp -> m ()
setDepthStoreOp self val = liftDOM (void (((toJSVal val) >>= \a2' -> js_setDepthStoreOp (self) a2')))
foreign import javascript unsafe "(($1) => { return $1[\"depthStoreOp\"]; })"
js_getDepthStoreOp :: GPURenderPassDepthStencilAttachment -> IO JSVal
-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-depthstoreop GPURenderPassDepthStencilAttachment.depthStoreOp specification>
getDepthStoreOp :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> m (Maybe GPUStoreOp)
getDepthStoreOp self = liftDOM (((js_getDepthStoreOp (self)) >>= fromJSValUnchecked))
-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-depthstoreop GPURenderPassDepthStencilAttachment.depthStoreOp specification>
getDepthStoreOpUnsafe :: (MonadDOM m, HasCallStack) => GPURenderPassDepthStencilAttachment -> m GPUStoreOp
getDepthStoreOpUnsafe self = liftDOM ((((js_getDepthStoreOp (self)) >>= 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 ((pFromJSVal <$> (js_getDepthStoreOp (self))))
foreign import javascript safe "(($1, $2) => { $1[\"depthReadOnly\"] = $2; })"
js_setDepthReadOnly :: GPURenderPassDepthStencilAttachment -> Bool -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-depthreadonly GPURenderPassDepthStencilAttachment.depthReadOnly specification>
setDepthReadOnly :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> Bool -> m ()
setDepthReadOnly self val = liftDOM (void ((js_setDepthReadOnly (self) (val))))
foreign import javascript unsafe "(($1) => { return $1[\"depthReadOnly\"]; })"
js_getDepthReadOnly :: GPURenderPassDepthStencilAttachment -> IO JSVal
-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-depthreadonly GPURenderPassDepthStencilAttachment.depthReadOnly specification>
getDepthReadOnly :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> m (Maybe Bool)
getDepthReadOnly self = liftDOM (((js_getDepthReadOnly (self)) >>= fromJSValUnchecked))
-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-depthreadonly GPURenderPassDepthStencilAttachment.depthReadOnly specification>
getDepthReadOnlyUnsafe :: (MonadDOM m, HasCallStack) => GPURenderPassDepthStencilAttachment -> m Bool
getDepthReadOnlyUnsafe self = liftDOM ((((js_getDepthReadOnly (self)) >>= 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 ((pFromJSVal <$> (js_getDepthReadOnly (self))))
foreign import javascript safe "(($1, $2) => { $1[\"stencilClearValue\"] = $2; })"
js_setStencilClearValue :: GPURenderPassDepthStencilAttachment -> Word -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-stencilclearvalue GPURenderPassDepthStencilAttachment.stencilClearValue specification>
setStencilClearValue :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> Word -> m ()
setStencilClearValue self val = liftDOM (void ((js_setStencilClearValue (self) (val))))
foreign import javascript unsafe "(($1) => { return $1[\"stencilClearValue\"]; })"
js_getStencilClearValue :: GPURenderPassDepthStencilAttachment -> IO JSVal
-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-stencilclearvalue GPURenderPassDepthStencilAttachment.stencilClearValue specification>
getStencilClearValue :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> m (Maybe Word)
getStencilClearValue self = liftDOM (((js_getStencilClearValue (self)) >>= fromJSValUnchecked))
-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-stencilclearvalue GPURenderPassDepthStencilAttachment.stencilClearValue specification>
getStencilClearValueUnsafe :: (MonadDOM m, HasCallStack) => GPURenderPassDepthStencilAttachment -> m Word
getStencilClearValueUnsafe self = liftDOM ((((js_getStencilClearValue (self)) >>= 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 ((pFromJSVal <$> (js_getStencilClearValue (self))))
foreign import javascript safe "(($1, $2) => { $1[\"stencilLoadOp\"] = $2; })"
js_setStencilLoadOp :: GPURenderPassDepthStencilAttachment -> JSVal -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-stencilloadop GPURenderPassDepthStencilAttachment.stencilLoadOp specification>
setStencilLoadOp :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> GPULoadOp -> m ()
setStencilLoadOp self val = liftDOM (void (((toJSVal val) >>= \a2' -> js_setStencilLoadOp (self) a2')))
foreign import javascript unsafe "(($1) => { return $1[\"stencilLoadOp\"]; })"
js_getStencilLoadOp :: GPURenderPassDepthStencilAttachment -> IO JSVal
-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-stencilloadop GPURenderPassDepthStencilAttachment.stencilLoadOp specification>
getStencilLoadOp :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> m (Maybe GPULoadOp)
getStencilLoadOp self = liftDOM (((js_getStencilLoadOp (self)) >>= fromJSValUnchecked))
-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-stencilloadop GPURenderPassDepthStencilAttachment.stencilLoadOp specification>
getStencilLoadOpUnsafe :: (MonadDOM m, HasCallStack) => GPURenderPassDepthStencilAttachment -> m GPULoadOp
getStencilLoadOpUnsafe self = liftDOM ((((js_getStencilLoadOp (self)) >>= 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 ((pFromJSVal <$> (js_getStencilLoadOp (self))))
foreign import javascript safe "(($1, $2) => { $1[\"stencilStoreOp\"] = $2; })"
js_setStencilStoreOp :: GPURenderPassDepthStencilAttachment -> JSVal -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-stencilstoreop GPURenderPassDepthStencilAttachment.stencilStoreOp specification>
setStencilStoreOp :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> GPUStoreOp -> m ()
setStencilStoreOp self val = liftDOM (void (((toJSVal val) >>= \a2' -> js_setStencilStoreOp (self) a2')))
foreign import javascript unsafe "(($1) => { return $1[\"stencilStoreOp\"]; })"
js_getStencilStoreOp :: GPURenderPassDepthStencilAttachment -> IO JSVal
-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-stencilstoreop GPURenderPassDepthStencilAttachment.stencilStoreOp specification>
getStencilStoreOp :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> m (Maybe GPUStoreOp)
getStencilStoreOp self = liftDOM (((js_getStencilStoreOp (self)) >>= fromJSValUnchecked))
-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-stencilstoreop GPURenderPassDepthStencilAttachment.stencilStoreOp specification>
getStencilStoreOpUnsafe :: (MonadDOM m, HasCallStack) => GPURenderPassDepthStencilAttachment -> m GPUStoreOp
getStencilStoreOpUnsafe self = liftDOM ((((js_getStencilStoreOp (self)) >>= 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 ((pFromJSVal <$> (js_getStencilStoreOp (self))))
foreign import javascript safe "(($1, $2) => { $1[\"stencilReadOnly\"] = $2; })"
js_setStencilReadOnly :: GPURenderPassDepthStencilAttachment -> Bool -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-stencilreadonly GPURenderPassDepthStencilAttachment.stencilReadOnly specification>
setStencilReadOnly :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> Bool -> m ()
setStencilReadOnly self val = liftDOM (void ((js_setStencilReadOnly (self) (val))))
foreign import javascript unsafe "(($1) => { return $1[\"stencilReadOnly\"]; })"
js_getStencilReadOnly :: GPURenderPassDepthStencilAttachment -> IO JSVal
-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-stencilreadonly GPURenderPassDepthStencilAttachment.stencilReadOnly specification>
getStencilReadOnly :: (MonadDOM m) => GPURenderPassDepthStencilAttachment -> m (Maybe Bool)
getStencilReadOnly self = liftDOM (((js_getStencilReadOnly (self)) >>= fromJSValUnchecked))
-- | <https://gpuweb.github.io/gpuweb/#dom-gpurenderpassdepthstencilattachment-stencilreadonly GPURenderPassDepthStencilAttachment.stencilReadOnly specification>
getStencilReadOnlyUnsafe :: (MonadDOM m, HasCallStack) => GPURenderPassDepthStencilAttachment -> m Bool
getStencilReadOnlyUnsafe self = liftDOM ((((js_getStencilReadOnly (self)) >>= 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 ((pFromJSVal <$> (js_getStencilReadOnly (self))))