packages feed

ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/GPUBindGroupEntry.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.GPUBindGroupEntry
       (js_newGPUBindGroupEntry, js_setBinding, js_getBinding, js_setResource, js_getResource, newGPUBindGroupEntry, setBinding, getBinding, setResource, getResource, GPUBindGroupEntry(..), gTypeGPUBindGroupEntry)
       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, \"resource\": $2}); })"
        js_newGPUBindGroupEntry :: Word -> GPUBindingResource -> IO GPUBindGroupEntry
-- | <https://gpuweb.github.io/gpuweb/#dictdef-gpubindgroupentry GPUBindGroupEntry specification>
newGPUBindGroupEntry :: (MonadDOM m, IsGPUBindingResource resource) => Word -> resource -> m GPUBindGroupEntry
newGPUBindGroupEntry binding resource = liftDOM ((js_newGPUBindGroupEntry (binding) (Types.toGPUBindingResource resource)))

foreign import javascript safe "(($1, $2) => { $1[\"binding\"] = $2; })"
        js_setBinding :: GPUBindGroupEntry -> Word -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpubindgroupentry-binding GPUBindGroupEntry.binding specification>
setBinding :: (MonadDOM m) => GPUBindGroupEntry -> Word -> m ()
setBinding self val = liftDOM (void ((js_setBinding (self) (val))))

foreign import javascript unsafe "(($1) => { return $1[\"binding\"]; })"
        js_getBinding :: GPUBindGroupEntry -> IO Word
-- | <https://gpuweb.github.io/gpuweb/#dom-gpubindgroupentry-binding GPUBindGroupEntry.binding specification>
getBinding :: (MonadDOM m) => GPUBindGroupEntry -> m Word
getBinding self = liftDOM ((js_getBinding (self)))

foreign import javascript safe "(($1, $2) => { $1[\"resource\"] = $2; })"
        js_setResource :: GPUBindGroupEntry -> GPUBindingResource -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpubindgroupentry-resource GPUBindGroupEntry.resource specification>
setResource :: (MonadDOM m, IsGPUBindingResource val) => GPUBindGroupEntry -> val -> m ()
setResource self val = liftDOM (void ((js_setResource (self) (Types.toGPUBindingResource val))))

foreign import javascript unsafe "(($1) => { return $1[\"resource\"]; })"
        js_getResource :: GPUBindGroupEntry -> IO GPUBindingResource
-- | <https://gpuweb.github.io/gpuweb/#dom-gpubindgroupentry-resource GPUBindGroupEntry.resource specification>
getResource :: (MonadDOM m) => GPUBindGroupEntry -> m GPUBindingResource
getResource self = liftDOM ((js_getResource (self)))