packages feed

ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/GPUComputePassTimestampWrites.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.GPUComputePassTimestampWrites
       (js_newGPUComputePassTimestampWrites, js_setQuerySet, js_getQuerySet, js_setBeginningOfPassWriteIndex, js_getBeginningOfPassWriteIndex, js_setEndOfPassWriteIndex, js_getEndOfPassWriteIndex, newGPUComputePassTimestampWrites, setQuerySet, getQuerySet, setBeginningOfPassWriteIndex, getBeginningOfPassWriteIndex, getBeginningOfPassWriteIndexUnsafe, getBeginningOfPassWriteIndexUnchecked, setEndOfPassWriteIndex, getEndOfPassWriteIndex, getEndOfPassWriteIndexUnsafe, getEndOfPassWriteIndexUnchecked, GPUComputePassTimestampWrites(..), gTypeGPUComputePassTimestampWrites)
       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 ({\"querySet\": $1}); })"
        js_newGPUComputePassTimestampWrites :: GPUQuerySet -> IO GPUComputePassTimestampWrites
-- | <https://gpuweb.github.io/gpuweb/#dictdef-gpucomputepasstimestampwrites GPUComputePassTimestampWrites specification>
newGPUComputePassTimestampWrites :: (MonadDOM m) => GPUQuerySet -> m GPUComputePassTimestampWrites
newGPUComputePassTimestampWrites querySet = liftDOM ((js_newGPUComputePassTimestampWrites (querySet)))

foreign import javascript safe "(($1, $2) => { $1[\"querySet\"] = $2; })"
        js_setQuerySet :: GPUComputePassTimestampWrites -> GPUQuerySet -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpucomputepasstimestampwrites-queryset GPUComputePassTimestampWrites.querySet specification>
setQuerySet :: (MonadDOM m) => GPUComputePassTimestampWrites -> GPUQuerySet -> m ()
setQuerySet self val = liftDOM (void ((js_setQuerySet (self) (val))))

foreign import javascript unsafe "(($1) => { return $1[\"querySet\"]; })"
        js_getQuerySet :: GPUComputePassTimestampWrites -> IO GPUQuerySet
-- | <https://gpuweb.github.io/gpuweb/#dom-gpucomputepasstimestampwrites-queryset GPUComputePassTimestampWrites.querySet specification>
getQuerySet :: (MonadDOM m) => GPUComputePassTimestampWrites -> m GPUQuerySet
getQuerySet self = liftDOM ((js_getQuerySet (self)))

foreign import javascript safe "(($1, $2) => { $1[\"beginningOfPassWriteIndex\"] = $2; })"
        js_setBeginningOfPassWriteIndex :: GPUComputePassTimestampWrites -> Word -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpucomputepasstimestampwrites-beginningofpasswriteindex GPUComputePassTimestampWrites.beginningOfPassWriteIndex specification>
setBeginningOfPassWriteIndex :: (MonadDOM m) => GPUComputePassTimestampWrites -> Word -> m ()
setBeginningOfPassWriteIndex self val = liftDOM (void ((js_setBeginningOfPassWriteIndex (self) (val))))

foreign import javascript unsafe "(($1) => { return $1[\"beginningOfPassWriteIndex\"]; })"
        js_getBeginningOfPassWriteIndex :: GPUComputePassTimestampWrites -> IO JSVal
-- | <https://gpuweb.github.io/gpuweb/#dom-gpucomputepasstimestampwrites-beginningofpasswriteindex GPUComputePassTimestampWrites.beginningOfPassWriteIndex specification>
getBeginningOfPassWriteIndex :: (MonadDOM m) => GPUComputePassTimestampWrites -> m (Maybe Word)
getBeginningOfPassWriteIndex self = liftDOM (((js_getBeginningOfPassWriteIndex (self)) >>= fromJSValUnchecked))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpucomputepasstimestampwrites-beginningofpasswriteindex GPUComputePassTimestampWrites.beginningOfPassWriteIndex specification>
getBeginningOfPassWriteIndexUnsafe :: (MonadDOM m, HasCallStack) => GPUComputePassTimestampWrites -> m Word
getBeginningOfPassWriteIndexUnsafe self = liftDOM ((((js_getBeginningOfPassWriteIndex (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpucomputepasstimestampwrites-beginningofpasswriteindex GPUComputePassTimestampWrites.beginningOfPassWriteIndex specification>
getBeginningOfPassWriteIndexUnchecked :: (MonadDOM m) => GPUComputePassTimestampWrites -> m Word
getBeginningOfPassWriteIndexUnchecked self = liftDOM ((pFromJSVal <$> (js_getBeginningOfPassWriteIndex (self))))

foreign import javascript safe "(($1, $2) => { $1[\"endOfPassWriteIndex\"] = $2; })"
        js_setEndOfPassWriteIndex :: GPUComputePassTimestampWrites -> Word -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpucomputepasstimestampwrites-endofpasswriteindex GPUComputePassTimestampWrites.endOfPassWriteIndex specification>
setEndOfPassWriteIndex :: (MonadDOM m) => GPUComputePassTimestampWrites -> Word -> m ()
setEndOfPassWriteIndex self val = liftDOM (void ((js_setEndOfPassWriteIndex (self) (val))))

foreign import javascript unsafe "(($1) => { return $1[\"endOfPassWriteIndex\"]; })"
        js_getEndOfPassWriteIndex :: GPUComputePassTimestampWrites -> IO JSVal
-- | <https://gpuweb.github.io/gpuweb/#dom-gpucomputepasstimestampwrites-endofpasswriteindex GPUComputePassTimestampWrites.endOfPassWriteIndex specification>
getEndOfPassWriteIndex :: (MonadDOM m) => GPUComputePassTimestampWrites -> m (Maybe Word)
getEndOfPassWriteIndex self = liftDOM (((js_getEndOfPassWriteIndex (self)) >>= fromJSValUnchecked))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpucomputepasstimestampwrites-endofpasswriteindex GPUComputePassTimestampWrites.endOfPassWriteIndex specification>
getEndOfPassWriteIndexUnsafe :: (MonadDOM m, HasCallStack) => GPUComputePassTimestampWrites -> m Word
getEndOfPassWriteIndexUnsafe self = liftDOM ((((js_getEndOfPassWriteIndex (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpucomputepasstimestampwrites-endofpasswriteindex GPUComputePassTimestampWrites.endOfPassWriteIndex specification>
getEndOfPassWriteIndexUnchecked :: (MonadDOM m) => GPUComputePassTimestampWrites -> m Word
getEndOfPassWriteIndexUnchecked self = liftDOM ((pFromJSVal <$> (js_getEndOfPassWriteIndex (self))))