ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/GPUQuerySetDescriptor.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.GPUQuerySetDescriptor
(js_newGPUQuerySetDescriptor, js_setType, js_getType, js_setCount, js_getCount, newGPUQuerySetDescriptor, setType, getType, setCount, getCount, GPUQuerySetDescriptor(..), gTypeGPUQuerySetDescriptor)
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 ({\"type\": $1, \"count\": $2}); })"
js_newGPUQuerySetDescriptor :: JSVal -> Word -> IO GPUQuerySetDescriptor
-- | <https://gpuweb.github.io/gpuweb/#dictdef-gpuquerysetdescriptor GPUQuerySetDescriptor specification>
newGPUQuerySetDescriptor :: (MonadDOM m) => GPUQueryType -> Word -> m GPUQuerySetDescriptor
newGPUQuerySetDescriptor type' count = liftDOM (((toJSVal type') >>= \a1' -> js_newGPUQuerySetDescriptor a1' (count)))
foreign import javascript safe "(($1, $2) => { $1[\"type\"] = $2; })"
js_setType :: GPUQuerySetDescriptor -> JSVal -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpuquerysetdescriptor-type GPUQuerySetDescriptor.type specification>
setType :: (MonadDOM m) => GPUQuerySetDescriptor -> GPUQueryType -> m ()
setType self val = liftDOM (void (((toJSVal val) >>= \a2' -> js_setType (self) a2')))
foreign import javascript unsafe "(($1) => { return $1[\"type\"]; })"
js_getType :: GPUQuerySetDescriptor -> IO JSVal
-- | <https://gpuweb.github.io/gpuweb/#dom-gpuquerysetdescriptor-type GPUQuerySetDescriptor.type specification>
getType :: (MonadDOM m) => GPUQuerySetDescriptor -> m GPUQueryType
getType self = liftDOM (((js_getType (self)) >>= fromJSValUnchecked))
foreign import javascript safe "(($1, $2) => { $1[\"count\"] = $2; })"
js_setCount :: GPUQuerySetDescriptor -> Word -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpuquerysetdescriptor-count GPUQuerySetDescriptor.count specification>
setCount :: (MonadDOM m) => GPUQuerySetDescriptor -> Word -> m ()
setCount self val = liftDOM (void ((js_setCount (self) (val))))
foreign import javascript unsafe "(($1) => { return $1[\"count\"]; })"
js_getCount :: GPUQuerySetDescriptor -> IO Word
-- | <https://gpuweb.github.io/gpuweb/#dom-gpuquerysetdescriptor-count GPUQuerySetDescriptor.count specification>
getCount :: (MonadDOM m) => GPUQuerySetDescriptor -> m Word
getCount self = liftDOM ((js_getCount (self)))