ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/GPUComputePassDescriptor.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.GPUComputePassDescriptor
(js_newGPUComputePassDescriptor, js_setTimestampWrites, js_getTimestampWrites, newGPUComputePassDescriptor, setTimestampWrites, getTimestampWrites, getTimestampWritesUnsafe, getTimestampWritesUnchecked, GPUComputePassDescriptor(..), gTypeGPUComputePassDescriptor)
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 "(() => { return ({}); })"
js_newGPUComputePassDescriptor :: IO GPUComputePassDescriptor
-- | <https://gpuweb.github.io/gpuweb/#dictdef-gpucomputepassdescriptor GPUComputePassDescriptor specification>
newGPUComputePassDescriptor :: (MonadDOM m) => m GPUComputePassDescriptor
newGPUComputePassDescriptor = liftDOM ((js_newGPUComputePassDescriptor))
foreign import javascript safe "(($1, $2) => { $1[\"timestampWrites\"] = $2; })"
js_setTimestampWrites :: GPUComputePassDescriptor -> GPUComputePassTimestampWrites -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpucomputepassdescriptor-timestampwrites GPUComputePassDescriptor.timestampWrites specification>
setTimestampWrites :: (MonadDOM m) => GPUComputePassDescriptor -> GPUComputePassTimestampWrites -> m ()
setTimestampWrites self val = liftDOM (void ((js_setTimestampWrites (self) (val))))
foreign import javascript unsafe "(($1) => { return $1[\"timestampWrites\"]; })"
js_getTimestampWrites :: GPUComputePassDescriptor -> IO JSVal
-- | <https://gpuweb.github.io/gpuweb/#dom-gpucomputepassdescriptor-timestampwrites GPUComputePassDescriptor.timestampWrites specification>
getTimestampWrites :: (MonadDOM m) => GPUComputePassDescriptor -> m (Maybe GPUComputePassTimestampWrites)
getTimestampWrites self = liftDOM (((js_getTimestampWrites (self)) >>= fromJSValUnchecked))
-- | <https://gpuweb.github.io/gpuweb/#dom-gpucomputepassdescriptor-timestampwrites GPUComputePassDescriptor.timestampWrites specification>
getTimestampWritesUnsafe :: (MonadDOM m, HasCallStack) => GPUComputePassDescriptor -> m GPUComputePassTimestampWrites
getTimestampWritesUnsafe self = liftDOM ((((js_getTimestampWrites (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))
-- | <https://gpuweb.github.io/gpuweb/#dom-gpucomputepassdescriptor-timestampwrites GPUComputePassDescriptor.timestampWrites specification>
getTimestampWritesUnchecked :: (MonadDOM m) => GPUComputePassDescriptor -> m GPUComputePassTimestampWrites
getTimestampWritesUnchecked self = liftDOM ((pFromJSVal <$> (js_getTimestampWrites (self))))