ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/GPUBindGroupLayoutEntry.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.GPUBindGroupLayoutEntry
(js_newGPUBindGroupLayoutEntry, js_setBinding, js_getBinding, js_setVisibility, js_getVisibility, js_setBuffer, js_getBuffer, js_setSampler, js_getSampler, js_setTexture, js_getTexture, js_setStorageTexture, js_getStorageTexture, js_setExternalTexture, js_getExternalTexture, newGPUBindGroupLayoutEntry, setBinding, getBinding, setVisibility, getVisibility, setBuffer, getBuffer, getBufferUnsafe, getBufferUnchecked, setSampler, getSampler, getSamplerUnsafe, getSamplerUnchecked, setTexture, getTexture, getTextureUnsafe, getTextureUnchecked, setStorageTexture, getStorageTexture, getStorageTextureUnsafe, getStorageTextureUnchecked, setExternalTexture, getExternalTexture, getExternalTextureUnsafe, getExternalTextureUnchecked, GPUBindGroupLayoutEntry(..), gTypeGPUBindGroupLayoutEntry)
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, $2) => { return ({\"binding\": $1, \"visibility\": $2}); })"
js_newGPUBindGroupLayoutEntry :: Word -> Word -> IO GPUBindGroupLayoutEntry
-- | <https://gpuweb.github.io/gpuweb/#dictdef-gpubindgrouplayoutentry GPUBindGroupLayoutEntry specification>
newGPUBindGroupLayoutEntry :: (MonadDOM m) => Word -> Word -> m GPUBindGroupLayoutEntry
newGPUBindGroupLayoutEntry binding visibility = liftDOM ((js_newGPUBindGroupLayoutEntry (binding) (visibility)))
foreign import javascript safe "(($1, $2) => { $1[\"binding\"] = $2; })"
js_setBinding :: GPUBindGroupLayoutEntry -> Word -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpubindgrouplayoutentry-binding GPUBindGroupLayoutEntry.binding specification>
setBinding :: (MonadDOM m) => GPUBindGroupLayoutEntry -> Word -> m ()
setBinding self val = liftDOM (void ((js_setBinding (self) (val))))
foreign import javascript unsafe "(($1) => { return $1[\"binding\"]; })"
js_getBinding :: GPUBindGroupLayoutEntry -> IO Word
-- | <https://gpuweb.github.io/gpuweb/#dom-gpubindgrouplayoutentry-binding GPUBindGroupLayoutEntry.binding specification>
getBinding :: (MonadDOM m) => GPUBindGroupLayoutEntry -> m Word
getBinding self = liftDOM ((js_getBinding (self)))
foreign import javascript safe "(($1, $2) => { $1[\"visibility\"] = $2; })"
js_setVisibility :: GPUBindGroupLayoutEntry -> Word -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpubindgrouplayoutentry-visibility GPUBindGroupLayoutEntry.visibility specification>
setVisibility :: (MonadDOM m) => GPUBindGroupLayoutEntry -> Word -> m ()
setVisibility self val = liftDOM (void ((js_setVisibility (self) (val))))
foreign import javascript unsafe "(($1) => { return $1[\"visibility\"]; })"
js_getVisibility :: GPUBindGroupLayoutEntry -> IO Word
-- | <https://gpuweb.github.io/gpuweb/#dom-gpubindgrouplayoutentry-visibility GPUBindGroupLayoutEntry.visibility specification>
getVisibility :: (MonadDOM m) => GPUBindGroupLayoutEntry -> m Word
getVisibility self = liftDOM ((js_getVisibility (self)))
foreign import javascript safe "(($1, $2) => { $1[\"buffer\"] = $2; })"
js_setBuffer :: GPUBindGroupLayoutEntry -> GPUBufferBindingLayout -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpubindgrouplayoutentry-buffer GPUBindGroupLayoutEntry.buffer specification>
setBuffer :: (MonadDOM m) => GPUBindGroupLayoutEntry -> GPUBufferBindingLayout -> m ()
setBuffer self val = liftDOM (void ((js_setBuffer (self) (val))))
foreign import javascript unsafe "(($1) => { return $1[\"buffer\"]; })"
js_getBuffer :: GPUBindGroupLayoutEntry -> IO JSVal
-- | <https://gpuweb.github.io/gpuweb/#dom-gpubindgrouplayoutentry-buffer GPUBindGroupLayoutEntry.buffer specification>
getBuffer :: (MonadDOM m) => GPUBindGroupLayoutEntry -> m (Maybe GPUBufferBindingLayout)
getBuffer self = liftDOM (((js_getBuffer (self)) >>= fromJSValUnchecked))
-- | <https://gpuweb.github.io/gpuweb/#dom-gpubindgrouplayoutentry-buffer GPUBindGroupLayoutEntry.buffer specification>
getBufferUnsafe :: (MonadDOM m, HasCallStack) => GPUBindGroupLayoutEntry -> m GPUBufferBindingLayout
getBufferUnsafe self = liftDOM ((((js_getBuffer (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))
-- | <https://gpuweb.github.io/gpuweb/#dom-gpubindgrouplayoutentry-buffer GPUBindGroupLayoutEntry.buffer specification>
getBufferUnchecked :: (MonadDOM m) => GPUBindGroupLayoutEntry -> m GPUBufferBindingLayout
getBufferUnchecked self = liftDOM ((pFromJSVal <$> (js_getBuffer (self))))
foreign import javascript safe "(($1, $2) => { $1[\"sampler\"] = $2; })"
js_setSampler :: GPUBindGroupLayoutEntry -> GPUSamplerBindingLayout -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpubindgrouplayoutentry-sampler GPUBindGroupLayoutEntry.sampler specification>
setSampler :: (MonadDOM m) => GPUBindGroupLayoutEntry -> GPUSamplerBindingLayout -> m ()
setSampler self val = liftDOM (void ((js_setSampler (self) (val))))
foreign import javascript unsafe "(($1) => { return $1[\"sampler\"]; })"
js_getSampler :: GPUBindGroupLayoutEntry -> IO JSVal
-- | <https://gpuweb.github.io/gpuweb/#dom-gpubindgrouplayoutentry-sampler GPUBindGroupLayoutEntry.sampler specification>
getSampler :: (MonadDOM m) => GPUBindGroupLayoutEntry -> m (Maybe GPUSamplerBindingLayout)
getSampler self = liftDOM (((js_getSampler (self)) >>= fromJSValUnchecked))
-- | <https://gpuweb.github.io/gpuweb/#dom-gpubindgrouplayoutentry-sampler GPUBindGroupLayoutEntry.sampler specification>
getSamplerUnsafe :: (MonadDOM m, HasCallStack) => GPUBindGroupLayoutEntry -> m GPUSamplerBindingLayout
getSamplerUnsafe self = liftDOM ((((js_getSampler (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))
-- | <https://gpuweb.github.io/gpuweb/#dom-gpubindgrouplayoutentry-sampler GPUBindGroupLayoutEntry.sampler specification>
getSamplerUnchecked :: (MonadDOM m) => GPUBindGroupLayoutEntry -> m GPUSamplerBindingLayout
getSamplerUnchecked self = liftDOM ((pFromJSVal <$> (js_getSampler (self))))
foreign import javascript safe "(($1, $2) => { $1[\"texture\"] = $2; })"
js_setTexture :: GPUBindGroupLayoutEntry -> GPUTextureBindingLayout -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpubindgrouplayoutentry-texture GPUBindGroupLayoutEntry.texture specification>
setTexture :: (MonadDOM m) => GPUBindGroupLayoutEntry -> GPUTextureBindingLayout -> m ()
setTexture self val = liftDOM (void ((js_setTexture (self) (val))))
foreign import javascript unsafe "(($1) => { return $1[\"texture\"]; })"
js_getTexture :: GPUBindGroupLayoutEntry -> IO JSVal
-- | <https://gpuweb.github.io/gpuweb/#dom-gpubindgrouplayoutentry-texture GPUBindGroupLayoutEntry.texture specification>
getTexture :: (MonadDOM m) => GPUBindGroupLayoutEntry -> m (Maybe GPUTextureBindingLayout)
getTexture self = liftDOM (((js_getTexture (self)) >>= fromJSValUnchecked))
-- | <https://gpuweb.github.io/gpuweb/#dom-gpubindgrouplayoutentry-texture GPUBindGroupLayoutEntry.texture specification>
getTextureUnsafe :: (MonadDOM m, HasCallStack) => GPUBindGroupLayoutEntry -> m GPUTextureBindingLayout
getTextureUnsafe self = liftDOM ((((js_getTexture (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))
-- | <https://gpuweb.github.io/gpuweb/#dom-gpubindgrouplayoutentry-texture GPUBindGroupLayoutEntry.texture specification>
getTextureUnchecked :: (MonadDOM m) => GPUBindGroupLayoutEntry -> m GPUTextureBindingLayout
getTextureUnchecked self = liftDOM ((pFromJSVal <$> (js_getTexture (self))))
foreign import javascript safe "(($1, $2) => { $1[\"storageTexture\"] = $2; })"
js_setStorageTexture :: GPUBindGroupLayoutEntry -> GPUStorageTextureBindingLayout -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpubindgrouplayoutentry-storagetexture GPUBindGroupLayoutEntry.storageTexture specification>
setStorageTexture :: (MonadDOM m) => GPUBindGroupLayoutEntry -> GPUStorageTextureBindingLayout -> m ()
setStorageTexture self val = liftDOM (void ((js_setStorageTexture (self) (val))))
foreign import javascript unsafe "(($1) => { return $1[\"storageTexture\"]; })"
js_getStorageTexture :: GPUBindGroupLayoutEntry -> IO JSVal
-- | <https://gpuweb.github.io/gpuweb/#dom-gpubindgrouplayoutentry-storagetexture GPUBindGroupLayoutEntry.storageTexture specification>
getStorageTexture :: (MonadDOM m) => GPUBindGroupLayoutEntry -> m (Maybe GPUStorageTextureBindingLayout)
getStorageTexture self = liftDOM (((js_getStorageTexture (self)) >>= fromJSValUnchecked))
-- | <https://gpuweb.github.io/gpuweb/#dom-gpubindgrouplayoutentry-storagetexture GPUBindGroupLayoutEntry.storageTexture specification>
getStorageTextureUnsafe :: (MonadDOM m, HasCallStack) => GPUBindGroupLayoutEntry -> m GPUStorageTextureBindingLayout
getStorageTextureUnsafe self = liftDOM ((((js_getStorageTexture (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))
-- | <https://gpuweb.github.io/gpuweb/#dom-gpubindgrouplayoutentry-storagetexture GPUBindGroupLayoutEntry.storageTexture specification>
getStorageTextureUnchecked :: (MonadDOM m) => GPUBindGroupLayoutEntry -> m GPUStorageTextureBindingLayout
getStorageTextureUnchecked self = liftDOM ((pFromJSVal <$> (js_getStorageTexture (self))))
foreign import javascript safe "(($1, $2) => { $1[\"externalTexture\"] = $2; })"
js_setExternalTexture :: GPUBindGroupLayoutEntry -> GPUExternalTextureBindingLayout -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpubindgrouplayoutentry-externaltexture GPUBindGroupLayoutEntry.externalTexture specification>
setExternalTexture :: (MonadDOM m) => GPUBindGroupLayoutEntry -> GPUExternalTextureBindingLayout -> m ()
setExternalTexture self val = liftDOM (void ((js_setExternalTexture (self) (val))))
foreign import javascript unsafe "(($1) => { return $1[\"externalTexture\"]; })"
js_getExternalTexture :: GPUBindGroupLayoutEntry -> IO JSVal
-- | <https://gpuweb.github.io/gpuweb/#dom-gpubindgrouplayoutentry-externaltexture GPUBindGroupLayoutEntry.externalTexture specification>
getExternalTexture :: (MonadDOM m) => GPUBindGroupLayoutEntry -> m (Maybe GPUExternalTextureBindingLayout)
getExternalTexture self = liftDOM (((js_getExternalTexture (self)) >>= fromJSValUnchecked))
-- | <https://gpuweb.github.io/gpuweb/#dom-gpubindgrouplayoutentry-externaltexture GPUBindGroupLayoutEntry.externalTexture specification>
getExternalTextureUnsafe :: (MonadDOM m, HasCallStack) => GPUBindGroupLayoutEntry -> m GPUExternalTextureBindingLayout
getExternalTextureUnsafe self = liftDOM ((((js_getExternalTexture (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))
-- | <https://gpuweb.github.io/gpuweb/#dom-gpubindgrouplayoutentry-externaltexture GPUBindGroupLayoutEntry.externalTexture specification>
getExternalTextureUnchecked :: (MonadDOM m) => GPUBindGroupLayoutEntry -> m GPUExternalTextureBindingLayout
getExternalTextureUnchecked self = liftDOM ((pFromJSVal <$> (js_getExternalTexture (self))))