packages feed

ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/GPUObjectBase.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.GPUObjectBase
       (js_setLabel, js_getLabel, setLabel, getLabel, GPUObjectBase(..), gTypeGPUObjectBase, IsGPUObjectBase, toGPUObjectBase)
       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) => { $1[\"label\"] = $2; })"
        js_setLabel :: GPUObjectBase -> JSString -> IO ()
-- | <https://developer.mozilla.org/docs/Web/API/GPUBindGroup/label MDN GPUObjectBase.label documentation>
setLabel :: (MonadDOM m, IsGPUObjectBase self, ToJSString val) => self -> val -> m ()
setLabel self val = liftDOM (void ((js_setLabel ((Types.toGPUObjectBase self)) (toJSString val))))

foreign import javascript unsafe "(($1) => { return $1[\"label\"]; })"
        js_getLabel :: GPUObjectBase -> IO JSString
-- | <https://developer.mozilla.org/docs/Web/API/GPUBindGroup/label MDN GPUObjectBase.label documentation>
getLabel :: (MonadDOM m, IsGPUObjectBase self, FromJSString result) => self -> m result
getLabel self = liftDOM ((fromJSString <$> (js_getLabel ((Types.toGPUObjectBase self)))))